Class ReshapeWorker
- java.lang.Object
-
- com.levigo.jadice.server.core.NodeWorker<ReshapeNode>
-
- com.levigo.jadice.server.documentplatform.ReshapeWorker
-
- All Implemented Interfaces:
QualifiedLogEventReceiver
,WorkerController<ReshapeNode>
,Runnable
public class ReshapeWorker extends NodeWorker<ReshapeNode>
-
-
Constructor Summary
Constructors Constructor Description ReshapeWorker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addReshapeReadListener(ReshapeReadListener listener)
protected void
doAbortNow()
NodeWorker implementations can provide here own logic that shall be performed when an immediate abort is triggered.com.levigo.jadice.document.read.Reader
getCurrentReader()
DocumentProcessor
getDocumentProcessor()
Boolean
getImageRepackingAllowedDefaultValue()
List<ReshapeReadListener>
getReshapeReadListeners()
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.void
setDocumentProcessor(DocumentProcessor documentProcessor)
ADocumentProcessor
that manipulatesDocument
s can be injected here via Spring configuration.void
setImageRepackingAllowedDefaultValue(boolean imageRepackingAllowedDefaultValue)
void
setReshapeListener(ReshapeListener listener)
void
setReshapeReadListeners(List<ReshapeReadListener> listeners)
protected 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, doAbort, 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<ReshapeNode>
- Throws:
Throwable
- in case of preparation errors- See Also:
NodeWorker.initialize()
,NodeWorker.work()
,NodeWorker.postWork()
-
work
protected void work() throws Throwable
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<ReshapeNode>
- Throws:
Throwable
- in case of processing failure
-
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<ReshapeNode>
- Throws:
Throwable
- in case of post processing errors- See Also:
NodeWorker.work()
,NodeWorker.preWork()
-
doAbortNow
protected void doAbortNow()
Description copied from class:NodeWorker
NodeWorker implementations can provide here own logic that shall be performed when an immediate abort is triggered.jadice server 5.5.0.0
- Overrides:
doAbortNow
in classNodeWorker<ReshapeNode>
-
getDocumentProcessor
public DocumentProcessor getDocumentProcessor()
- Returns:
- a
DocumentProcessor
that can manipulateDocument
s before reshaping
-
setDocumentProcessor
public void setDocumentProcessor(DocumentProcessor documentProcessor)
ADocumentProcessor
that manipulatesDocument
s can be injected here via Spring configuration.- Parameters:
documentProcessor
- theDocumentProcessor
to use
-
getCurrentReader
public com.levigo.jadice.document.read.Reader getCurrentReader()
- Returns:
- The
Reader
instance which is currently in use.
-
setReshapeListener
public void setReshapeListener(ReshapeListener listener)
-
getImageRepackingAllowedDefaultValue
public Boolean getImageRepackingAllowedDefaultValue()
-
setImageRepackingAllowedDefaultValue
public void setImageRepackingAllowedDefaultValue(boolean imageRepackingAllowedDefaultValue)
-
addReshapeReadListener
public void addReshapeReadListener(ReshapeReadListener listener)
-
setReshapeReadListeners
public void setReshapeReadListeners(List<ReshapeReadListener> listeners)
-
getReshapeReadListeners
public List<ReshapeReadListener> getReshapeReadListeners()
-
-