Class JadiceDocumentInfoWorker
- java.lang.Object
-
- com.levigo.jadice.server.core.NodeWorker<T>
-
- com.levigo.jadice.server.core.StreamWorker<JadiceDocumentInfoNode>
-
- com.levigo.jadice.server.documentplatform.JadiceDocumentInfoWorker
-
- All Implemented Interfaces:
QualifiedLogEventReceiver
,WorkerController<JadiceDocumentInfoNode>
,Runnable
public class JadiceDocumentInfoWorker extends StreamWorker<JadiceDocumentInfoNode>
-
-
Constructor Summary
Constructors Constructor Description JadiceDocumentInfoWorker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
postWork()
This method is called immediately afterNodeWorker.work()
has returned.protected void
preWork()
This method is called immediately beforeNodeWorker.work()
will be called.protected void
work(Stream stream)
Implement this method in order to work on a single stream.-
Methods inherited from class com.levigo.jadice.server.core.StreamWorker
accept, reject, work
-
Methods inherited from class com.levigo.jadice.server.core.NodeWorker
abort, abortNow, addInputBundle, addOutputBundle, doAbort, doAbortNow, error, error, error, fail, fail, fail, getController, getInputBundle, getInputBundles, getJob, getLimitSupport, getNode, getOutputBundle, getOutputBundles, getServerJob, getState, getStreamTransportFactory, getTransportSender, initialize, isAbortRequested, run, setDescriptor, setJob, toString, warn, warn, warn
-
-
-
-
Method Detail
-
preWork
protected void preWork() throws Throwable
Description copied from class:NodeWorker
This method is called immediately beforeNodeWorker.work()
will be called.Use this method e.g. to initialize objects on the same
Thread
on whichNodeWorker.work()
is executed in contrast toNodeWorker.initialize()
which is called on a differentThread
.- Overrides:
preWork
in classNodeWorker<JadiceDocumentInfoNode>
- Throws:
Throwable
- in case of preparation errors- See Also:
NodeWorker.initialize()
,NodeWorker.work()
,NodeWorker.postWork()
-
work
protected void work(Stream stream) throws IOException, com.levigo.jadice.document.JadiceException
Description copied from class:StreamWorker
Implement this method in order to work on a single stream.- Specified by:
work
in classStreamWorker<JadiceDocumentInfoNode>
- Parameters:
stream
- theStream
to work on- Throws:
IOException
com.levigo.jadice.document.JadiceException
-
postWork
protected void postWork() throws Throwable
Description copied from class:NodeWorker
This method is called immediately afterNodeWorker.work()
has returned. It will be called even when a failure inNodeWorker.work()
has occured.Use this method e.g. to finalize objects on the same
Thread
on whichNodeWorker.work()
is executed.- Overrides:
postWork
in classNodeWorker<JadiceDocumentInfoNode>
- Throws:
Throwable
- in case of post processing errors- See Also:
NodeWorker.work()
,NodeWorker.preWork()
-
-