Class AbstractMSWorker<N extends Node>
- java.lang.Object
-
- com.levigo.jadice.server.core.NodeWorker<T>
-
- com.levigo.jadice.server.core.StreamWorker<N>
-
- com.levigo.jadice.server.msoffice.AbstractMSWorker<N>
-
- All Implemented Interfaces:
QualifiedLogEventReceiver
,WorkerController<N>
,Runnable
- Direct Known Subclasses:
MSExcelWorker
,MSOutlookWorker
,MSPowerpointWorker
,MSProjectWorker
,MSVisioWorker
,MSWordWorker
public abstract class AbstractMSWorker<N extends Node> extends StreamWorker<N>
-
-
Field Summary
Fields Modifier and Type Field Description protected org.jadice.util.log.Logger
logger
-
Constructor Summary
Constructors Constructor Description AbstractMSWorker()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract StreamDescriptor
createDescriptor(File result, StreamDescriptor parent)
protected void
doAbort()
NodeWorker implementations can provide here own logic that shall be performed when an abort is triggered.protected void
doAbortNow()
NodeWorker implementations can provide here own logic that shall be performed when an immediate abort is triggered.protected abstract Map<String,String>
getConversionProperties()
protected abstract Class<? extends CommandReceiver>
getConverterClass()
MSOfficeConverterPool
getConverterPool()
protected abstract String
getFilename()
protected abstract String
getTargetMimeType()
void
initialize()
This method may be overridden, in order do perform initialization which is necessary before the actual work is started.void
setConverterPool(MSOfficeConverterPool converterPool)
Set theMSOfficeConverterPool
.protected boolean
shallForwardStream(StreamDescriptor parentDescriptor, File file)
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, 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<N extends Node>
- Throws:
JobException
- in case of initialization failure
-
work
protected void work(Stream stream) throws Throwable
Description copied from class:StreamWorker
Implement this method in order to work on a single stream.
-
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<N extends Node>
-
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<N extends Node>
-
getConverterClass
protected abstract Class<? extends CommandReceiver> getConverterClass()
-
getTargetMimeType
protected abstract String getTargetMimeType()
-
createDescriptor
protected abstract StreamDescriptor createDescriptor(File result, StreamDescriptor parent)
-
getFilename
protected abstract String getFilename()
-
shallForwardStream
protected boolean shallForwardStream(StreamDescriptor parentDescriptor, File file)
-
getConverterPool
public MSOfficeConverterPool getConverterPool()
-
setConverterPool
public void setConverterPool(MSOfficeConverterPool converterPool)
Set theMSOfficeConverterPool
. Usually done in Spring XML configuration.- Parameters:
converterPool
-
-
-