001/* Interface for entities that can report FiringEvents.
002
003Copyright (c) 2007-2014 The Regents of the University of California.
004All rights reserved.
005Permission is hereby granted, without written agreement and without
006license or royalty fees, to use, copy, modify, and distribute this
007software and its documentation for any purpose, provided that the above
008copyright notice and the following two paragraphs appear in all copies
009of this software.
010
011IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
012FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
013ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
014THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
015SUCH DAMAGE.
016
017THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
018INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
019MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
020PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
021CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
022ENHANCEMENTS, OR MODIFICATIONS.
023
024 */
025
026package ptolemy.actor;
027
028/** Interface for entities that can report FiringEvents.
029 *
030 * @author Daniel Crawl
031 * @version $Id$
032 * @since Ptolemy II 7.0
033 * @Pt.ProposedRating Green (neuendor)
034 * @Pt.AcceptedRating Yellow (neuendor)
035 */
036public interface FiringsRecordable {
037    // FIXME: These methods should be added to Executable interface
038    // instead of being separate.
039
040    /** Append a listener to the current set of firing event listeners.
041     *  @param listener The listener to be appended.
042     *  @see #removeActorFiringListener(ActorFiringListener)
043     */
044    public void addActorFiringListener(ActorFiringListener listener);
045
046    /** Unregister a firing event listener.
047     *  @param listener The listener to be removed
048     *  @see #addActorFiringListener(ActorFiringListener)
049     */
050    public void removeActorFiringListener(ActorFiringListener listener);
051
052    /** Record a firing event.
053     *  @param type The type of firing event to record.
054     */
055    public void recordFiring(FiringEvent.FiringEventType type);
056}