T
- the object type the output handler will produce when the command is runpublic interface CommandOutputHandler<T>
extends com.atlassian.utils.process.OutputHandler
OutputHandler
which processes the standard output stream from a Command
and, optionally,
produces some object T
from it.
For commands which produce no interesting output, or for output handlers which process output in a way that does not
result in an object graph (for example, handlers that directly pipe data through some sort of callback), T
should be specialised as Void
and getOutput()
should return null
.
CommandAware
Modifier and Type | Method and Description |
---|---|
T |
getOutput()
Retrieves the processed output, if any.
|
@Nullable T getOutput()
Output handler implementations which are expected or required to produce output are encouraged to defer
throwing any exception indicating no output was produced until this method is called, rather than throwing the
exception during processing
.
null
if the command produced no interesting outputCopyright © 2020 Atlassian. All rights reserved.