public static class ProcessObserver.DefaultHandler extends Object implements ProcessObserver.Handler
ProcessObserver.Handler
, which simply prints observations to the console.Constructor and Description |
---|
DefaultHandler() |
Modifier and Type | Method and Description |
---|---|
void |
onObservationEnded(ProcessObserver.ObservedProcess process,
Integer exitCode,
ProgressMonitor pm)
Called if the process is no longer being observed.
|
void |
onObservationStarted(ProcessObserver.ObservedProcess process,
ProgressMonitor pm)
Called if the process is started being observed.
|
void |
onStderrLineReceived(ProcessObserver.ObservedProcess process,
String line,
ProgressMonitor pm)
Called if a new text line that has been received from
stderr . |
void |
onStdoutLineReceived(ProcessObserver.ObservedProcess process,
String line,
ProgressMonitor pm)
Called if a new text line that has been received from
stdout . |
public void onObservationStarted(ProcessObserver.ObservedProcess process, ProgressMonitor pm)
ProcessObserver.Handler
onObservationStarted
in interface ProcessObserver.Handler
process
- The observed process.pm
- The progress monitor, that is used to monitor the progress of the running process.public void onStdoutLineReceived(ProcessObserver.ObservedProcess process, String line, ProgressMonitor pm)
ProcessObserver.Handler
stdout
.onStdoutLineReceived
in interface ProcessObserver.Handler
process
- The observed process.line
- The line.pm
- The progress monitor, that is used to monitor the progress of the running process.public void onStderrLineReceived(ProcessObserver.ObservedProcess process, String line, ProgressMonitor pm)
ProcessObserver.Handler
stderr
.onStderrLineReceived
in interface ProcessObserver.Handler
process
- The observed process.line
- The line.pm
- The progress monitor, that is used to monitor the progress of the running process.public void onObservationEnded(ProcessObserver.ObservedProcess process, Integer exitCode, ProgressMonitor pm)
ProcessObserver.Handler
onObservationEnded
in interface ProcessObserver.Handler
process
- The observed process.exitCode
- The exit code, may be null
if unknown.pm
- The progress monitor, that is used to monitor the progress of the running process.Copyright © 2014–2016 European Space Agency (ESA). All rights reserved.