ptolemy.actor
Class StreamExecutionListener

java.lang.Object
  extended by ptolemy.actor.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: StreamExecutionListener.java 57040 2010-01-27 20:52:32Z cxh $
Author:
Steve Neuendorffer, Lukito Muliadi, Edward A. Lee
Accepted Rating:
Green (bart)
Proposed Rating:
Green (eal)

Field Summary
private  java.io.PrintStream _output
           
 
Constructor Summary
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
 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
 

Field Detail

_output

private java.io.PrintStream _output
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()