Package adams.core.management
Class LoggingObjectOutputPrinter
- java.lang.Object
-
- adams.core.management.AbstractOutputPrinter
-
- adams.core.management.DefaultOutputPrinter
-
- adams.core.management.LoggingObjectOutputPrinter
-
- All Implemented Interfaces:
LoggingObjectOwner
- Direct Known Subclasses:
RecordingOutputPrinter
public class LoggingObjectOutputPrinter extends DefaultOutputPrinter implements LoggingObjectOwner
Default printer for processes.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
OutputProcessStream
-
-
Field Summary
Fields Modifier and Type Field Description protected LoggingObject
m_Owner
the owningLoggingObject
.-
Fields inherited from class adams.core.management.AbstractOutputPrinter
m_ID, m_Reader, m_StdOut
-
-
Constructor Summary
Constructors Constructor Description LoggingObjectOutputPrinter(boolean stdout, Process process)
Initializes the printer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LoggingObject
getOwner()
Returns the owner.protected void
initialize(boolean stdout, Process process)
Initializes the printer.protected void
output(String line)
Outputs the specified line.void
setOwner(LoggingObject value)
Sets the owningLoggingObject
, i.e., the object which stdout and stderr objects are used for printingString
toString()
Returns a short description.-
Methods inherited from class adams.core.management.AbstractOutputPrinter
getID, isStdOut, process, read
-
-
-
-
Field Detail
-
m_Owner
protected LoggingObject m_Owner
the owningLoggingObject
.
-
-
Constructor Detail
-
LoggingObjectOutputPrinter
public LoggingObjectOutputPrinter(boolean stdout, Process process)
Initializes the printer.- Parameters:
stdout
- whether to use stdout or stderrprocess
- the process to monitor
-
-
Method Detail
-
initialize
protected void initialize(boolean stdout, Process process)
Initializes the printer.- Overrides:
initialize
in classAbstractOutputPrinter
- Parameters:
stdout
- whether to use stdout or stderrprocess
- the process to monitor
-
setOwner
public void setOwner(LoggingObject value)
Sets the owningLoggingObject
, i.e., the object which stdout and stderr objects are used for printing- Specified by:
setOwner
in interfaceLoggingObjectOwner
-
getOwner
public LoggingObject getOwner()
Returns the owner.- Specified by:
getOwner
in interfaceLoggingObjectOwner
- Returns:
- the owner, null if none set
-
output
protected void output(String line)
Outputs the specified line.- Overrides:
output
in classDefaultOutputPrinter
- Parameters:
line
- the text to output
-
toString
public String toString()
Returns a short description.- Overrides:
toString
in classAbstractOutputPrinter
- Returns:
- the description
-
-