Class StreamOutputWorker
- java.lang.Object
-
- com.levigo.jadice.server.core.NodeWorker<StreamOutputNode>
-
- com.levigo.jadice.server.nodes.worker.StreamOutputWorker
-
- All Implemented Interfaces:
QualifiedLogEventReceiver
,WorkerController<StreamOutputNode>
,Runnable
public class StreamOutputWorker extends NodeWorker<StreamOutputNode>
-
-
Constructor Summary
Constructors Constructor Description StreamOutputWorker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doAbort()
NodeWorker implementations can provide here own logic that shall be performed when an abort is triggered.void
initialize()
This method may be overridden, in order do perform initialization which is necessary before the actual work is started.void
work()
Implement this method to let the node perform some useful work.-
Methods inherited from class com.levigo.jadice.server.core.NodeWorker
abort, abortNow, addInputBundle, addOutputBundle, doAbortNow, error, error, error, fail, fail, fail, getController, getInputBundle, getInputBundles, getJob, getLimitSupport, getNode, getOutputBundle, getOutputBundles, getServerJob, getState, getStreamTransportFactory, getTransportSender, isAbortRequested, postWork, preWork, run, setDescriptor, setJob, toString, warn, warn, warn
-
-
-
-
Method Detail
-
initialize
public void initialize() throws JobException
Description copied from class:NodeWorker
This method may be overridden, in order do perform initialization which is necessary before the actual work is started.
Caveat: this method may be called synchronously by the server master thread. Therefore the work done within this call should be kept to an absolute minimum so as not to stall the job acceptor.- Overrides:
initialize
in classNodeWorker<StreamOutputNode>
- Throws:
JobException
- in case of initialization failure
-
work
public void work() throws IOException, ExecutionException
Description copied from class:NodeWorker
Implement this method to let the node perform some useful work.Implementors are free to throw whatever exception they see fit. If any
Throwable
is thrown from this method, the failure manager is notified about the fatal failure of the whole pipeline.- Specified by:
work
in classNodeWorker<StreamOutputNode>
- Throws:
IOException
ExecutionException
-
doAbort
protected void doAbort()
Description copied from class:NodeWorker
NodeWorker implementations can provide here own logic that shall be performed when an abort is triggered.- Overrides:
doAbort
in classNodeWorker<StreamOutputNode>
-
-