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 LoggingObjectm_Ownerthe 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 LoggingObjectgetOwner()Returns the owner.protected voidinitialize(boolean stdout, Process process)Initializes the printer.protected voidoutput(String line)Outputs the specified line.voidsetOwner(LoggingObject value)Sets the owningLoggingObject, i.e., the object which stdout and stderr objects are used for printingStringtoString()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:
initializein 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:
setOwnerin interfaceLoggingObjectOwner
-
getOwner
public LoggingObject getOwner()
Returns the owner.- Specified by:
getOwnerin interfaceLoggingObjectOwner- Returns:
- the owner, null if none set
-
output
protected void output(String line)
Outputs the specified line.- Overrides:
outputin classDefaultOutputPrinter- Parameters:
line- the text to output
-
toString
public String toString()
Returns a short description.- Overrides:
toStringin classAbstractOutputPrinter- Returns:
- the description
-
-