Package com.bc.ceres.core
Class ProcessObserver.DefaultHandler
- java.lang.Object
-
- com.bc.ceres.core.ProcessObserver.DefaultHandler
-
- All Implemented Interfaces:
ProcessObserver.Handler
- Enclosing class:
- ProcessObserver
public static class ProcessObserver.DefaultHandler extends Object implements ProcessObserver.Handler
Default implementation ofProcessObserver.Handler
, which simply prints observations to the console.
-
-
Constructor Summary
Constructors Constructor Description DefaultHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 fromstderr
.void
onStdoutLineReceived(ProcessObserver.ObservedProcess process, String line, ProgressMonitor pm)
Called if a new text line that has been received fromstdout
.
-
-
-
Method Detail
-
onObservationStarted
public void onObservationStarted(ProcessObserver.ObservedProcess process, ProgressMonitor pm)
Description copied from interface:ProcessObserver.Handler
Called if the process is started being observed.- Specified by:
onObservationStarted
in interfaceProcessObserver.Handler
- Parameters:
process
- The observed process.pm
- The progress monitor, that is used to monitor the progress of the running process.
-
onStdoutLineReceived
public void onStdoutLineReceived(ProcessObserver.ObservedProcess process, String line, ProgressMonitor pm)
Description copied from interface:ProcessObserver.Handler
Called if a new text line that has been received fromstdout
.- Specified by:
onStdoutLineReceived
in interfaceProcessObserver.Handler
- Parameters:
process
- The observed process.line
- The line.pm
- The progress monitor, that is used to monitor the progress of the running process.
-
onStderrLineReceived
public void onStderrLineReceived(ProcessObserver.ObservedProcess process, String line, ProgressMonitor pm)
Description copied from interface:ProcessObserver.Handler
Called if a new text line that has been received fromstderr
.- Specified by:
onStderrLineReceived
in interfaceProcessObserver.Handler
- Parameters:
process
- The observed process.line
- The line.pm
- The progress monitor, that is used to monitor the progress of the running process.
-
onObservationEnded
public void onObservationEnded(ProcessObserver.ObservedProcess process, Integer exitCode, ProgressMonitor pm)
Description copied from interface:ProcessObserver.Handler
Called if the process is no longer being observed.- Specified by:
onObservationEnded
in interfaceProcessObserver.Handler
- Parameters:
process
- The observed process.exitCode
- The exit code, may benull
if unknown.pm
- The progress monitor, that is used to monitor the progress of the running process.
-
-