001/*
002// This software is subject to the terms of the Eclipse Public License v1.0
003// Agreement, available at the following URL:
004// http://www.eclipse.org/legal/epl-v10.html.
005// You must accept the terms of that agreement to use this software.
006//
007// Copyright (C) 2011-2011 Pentaho
008// All Rights Reserved.
009*/
010package mondrian.server.monitor;
011
012import java.util.List;
013
014/**
015 * Information about a Mondrian server.
016 *
017 * <p>Also, the {@link #sendEvent(Event)} allows a Mondrian subsystem to
018 * notify the monitor of some event. The event is handled asynchronously.
019 * We strongly recommend that the event's fields simple, final values; one
020 * would not want the contents to have changed when the event is processed, or
021 * for the event to prevent a resource from being garbage-collected.</p>
022 *
023 * <p>All methods are thread-safe.</p>
024 */
025public interface Monitor {
026    ServerInfo getServer();
027
028    List<ConnectionInfo> getConnections();
029
030    List<StatementInfo> getStatements();
031
032    List<SqlStatementInfo> getSqlStatements();
033
034    /**
035     * Sends an event to the monitor.
036     *
037     * @param event Event
038     */
039    void sendEvent(Event event);
040}
041
042// End Monitor.java