Class ImageMagickConvertWorker
- java.lang.Object
-
- com.levigo.jadice.server.core.NodeWorker<ImageMagickConvertNode>
-
- com.levigo.jadice.server.imagemagick.ImageMagickConvertWorker
-
- All Implemented Interfaces:
QualifiedLogEventReceiver
,WorkerController<ImageMagickConvertNode>
,Runnable
public class ImageMagickConvertWorker extends NodeWorker<ImageMagickConvertNode>
The corresponding worker for theImageMagickConvertNode
.
-
-
Constructor Summary
Constructors Constructor Description ImageMagickConvertWorker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ByteArrayOutputStream
convert(InputStream inputStream, Integer imResizeMaxWidth, Integer imResizeMaxHeight)
void
setImagemagick(ImageMagick im)
Set theImageMagick
configuration.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, doAbortNow, error, error, error, fail, fail, fail, getController, getInputBundle, getInputBundles, getJob, getLimitSupport, getNode, getOutputBundle, getOutputBundles, getServerJob, getState, getStreamTransportFactory, getTransportSender, initialize, isAbortRequested, postWork, preWork, run, setDescriptor, setJob, toString, warn, warn, warn
-
-
-
-
Method Detail
-
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<ImageMagickConvertNode>
- Throws:
Throwable
- in case of processing failure
-
convert
protected ByteArrayOutputStream convert(InputStream inputStream, Integer imResizeMaxWidth, Integer imResizeMaxHeight) throws InterruptedException, IOException, com.github.geko444.im4java.core.IM4JavaException
- Throws:
InterruptedException
IOException
com.github.geko444.im4java.core.IM4JavaException
-
setImagemagick
public void setImagemagick(ImageMagick im)
Set theImageMagick
configuration. Usually injected via Spring XML configuration- Parameters:
im
- theImageMagick
configuration
-
-