ptolemy.kernel.util
Class StreamListener

java.lang.Object
  extended byptolemy.kernel.util.StreamListener
All Implemented Interfaces:
DebugListener

public class StreamListener
extends java.lang.Object
implements DebugListener

A debug listener that sends messages to a stream or to the standard output.

Since:
Ptolemy II 0.3
Version:
$Id: StreamListener.java,v 1.18 2004/04/13 03:44:18 cxh Exp $
Author:
Edward A. Lee, Christopher Hylands
See Also:
NamedObj, RecorderListener
Accepted Rating:
Green (cxh)
Proposed Rating:
Green (eal)

Constructor Summary
StreamListener()
          Create a debug listener that sends messages to the standard output.
StreamListener(java.io.OutputStream out)
          Create a debug listener that sends messages to the specified stream.
 
Method Summary
 void event(DebugEvent event)
          Print a string representation of the event to the stream associated with this listener.
 void message(java.lang.String message)
          Copy the message argument to the stream associated with the listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamListener

public StreamListener()
Create a debug listener that sends messages to the standard output.


StreamListener

public StreamListener(java.io.OutputStream out)
Create a debug listener that sends messages to the specified stream.

Method Detail

event

public void event(DebugEvent event)
Print a string representation of the event to the stream associated with this listener.

Specified by:
event in interface DebugListener
Parameters:
event - The event.

message

public void message(java.lang.String message)
Copy the message argument to the stream associated with the listener. Note that a newline is appended to the end of the message.

Specified by:
message in interface DebugListener
Parameters:
message - The debug message.