Package ptolemy.actor

Class StreamExecutionListener

  • All Implemented Interfaces:
    ExecutionListener

    public class StreamExecutionListener
    extends java.lang.Object
    implements ExecutionListener
    A default implementation of the ExecutionListener interface. This implementation prints information about each event to a stream.
    Since:
    Ptolemy II 0.4
    Version:
    $Id$
    Author:
    Steve Neuendorffer, Lukito Muliadi, Edward A. Lee
    Pt.AcceptedRating:
    Green (bart)
    Pt.ProposedRating:
    Green (eal)
    • Constructor Summary

      Constructors 
      Constructor Description
      StreamExecutionListener()
      Create a listener that sends messages to the standard output.
      StreamExecutionListener​(java.io.OutputStream out)
      Create a listener that sends messages to the given output stream.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void executionError​(Manager manager, java.lang.Throwable throwable)
      Report an execution failure by printing a message to output stream specified to the constructor.
      void executionFinished​(Manager manager)
      Report that the current execution finished by printing a message to output stream specified to the constructor.
      void managerStateChanged​(Manager manager)
      Report that the manager has changed state by printing a message to output stream specified to the constructor.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StreamExecutionListener

        public StreamExecutionListener()
        Create a listener that sends messages to the standard output.
      • StreamExecutionListener

        public StreamExecutionListener​(java.io.OutputStream out)
        Create a listener that sends messages to the given output stream.
        Parameters:
        out - The output stream to send the messages to.
    • Method Detail

      • executionError

        public void executionError​(Manager manager,
                                   java.lang.Throwable throwable)
        Report an execution failure by printing a message to output stream specified to the constructor.
        Specified by:
        executionError in interface ExecutionListener
        Parameters:
        manager - The manager controlling the execution.
        throwable - The throwable to report.
      • executionFinished

        public void executionFinished​(Manager manager)
        Report that the current execution finished by printing a message to output stream specified to the constructor.
        Specified by:
        executionFinished in interface ExecutionListener
        Parameters:
        manager - The manager controlling the execution.
      • managerStateChanged

        public void managerStateChanged​(Manager manager)
        Report that the manager has changed state by printing a message to output stream specified to the constructor.
        Specified by:
        managerStateChanged in interface ExecutionListener
        Parameters:
        manager - The manager controlling the execution.
        See Also:
        Manager.getState()