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
012/**
013 * Message sent to a {@link Monitor} indicating an event of interest or a
014 * command to execute.
015 */
016public interface Message {
017    /**
018     * Dispatches a call to the appropriate {@code visit} method on
019     * {@link mondrian.server.monitor.Visitor}.
020     *
021     * @param visitor Visitor
022     * @param <T> Return type
023     * @return Value returned by the {@code visit} method
024     */
025    <T> T accept(Visitor<T> visitor);
026}
027
028// End Message.java