Package ptolemy.kernel.util
Class StreamListener
- java.lang.Object
-
- ptolemy.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$
- Author:
- Edward A. Lee, Christopher Hylands
- See Also:
NamedObj
,RecorderListener
- Pt.AcceptedRating:
- Green (cxh)
- Pt.ProposedRating:
- Green (eal)
-
-
Constructor Summary
Constructors Constructor Description 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
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.- Parameters:
out
- The output stream used to create the debug listener.
-
-
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 interfaceDebugListener
- 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 interfaceDebugListener
- Parameters:
message
- The debug message.
-
-