Package org.ghost4j.converter
Class AbstractRemoteConverter
- java.lang.Object
-
- org.ghost4j.AbstractComponent
-
- org.ghost4j.AbstractRemoteComponent
-
- org.ghost4j.converter.AbstractRemoteConverter
-
- All Implemented Interfaces:
Component,Converter,RemoteConverter
- Direct Known Subclasses:
PDFConverter,PSConverter
public abstract class AbstractRemoteConverter extends AbstractRemoteComponent implements RemoteConverter
Abstract remote converter implementation. Used as base class for remote converters.
-
-
Field Summary
-
Fields inherited from class org.ghost4j.AbstractRemoteComponent
maxProcessCount, processCount
-
Fields inherited from class org.ghost4j.AbstractComponent
supportedDocumentClasses
-
-
Constructor Summary
Constructors Constructor Description AbstractRemoteConverter()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidconvert(Document document, java.io.OutputStream outputStream)Converts a given document and output results in provided output stream.byte[]remoteConvert(Document document)protected abstract voidrun(Document document, java.io.OutputStream outputStream)protected static voidstartRemoteConverter(RemoteConverter remoteConverter)Starts a remote converter server.-
Methods inherited from class org.ghost4j.AbstractRemoteComponent
buildJavaFork, getMaxProcessCount, getProcessCount, getRemoteComponent, isStandAloneModeSupported, setMaxProcessCount, startRemoteServer, waitForFreeProcess
-
Methods inherited from class org.ghost4j.AbstractComponent
assertDeviceSupported, assertDocumentSupported, copySettings, extractSettings, isDeviceSupported
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ghost4j.Component
copySettings, extractSettings
-
Methods inherited from interface org.ghost4j.converter.RemoteConverter
setMaxProcessCount
-
-
-
-
Method Detail
-
run
protected abstract void run(Document document, java.io.OutputStream outputStream) throws java.io.IOException, ConverterException, DocumentException
- Throws:
java.io.IOExceptionConverterExceptionDocumentException
-
startRemoteConverter
protected static void startRemoteConverter(RemoteConverter remoteConverter) throws ConverterException
Starts a remote converter server.- Parameters:
remoteConverter-- Throws:
ConverterException
-
remoteConvert
public byte[] remoteConvert(Document document) throws java.io.IOException, ConverterException, DocumentException
- Throws:
java.io.IOExceptionConverterExceptionDocumentException
-
convert
public void convert(Document document, java.io.OutputStream outputStream) throws java.io.IOException, ConverterException, DocumentException
Description copied from interface:ConverterConverts a given document and output results in provided output stream.- Specified by:
convertin interfaceConverter- Parameters:
document- Document to convert. Document type may or may no be supported (support left to the convert final implementation).outputStream- Output stream where converted document is written.- Throws:
java.io.IOExceptionConverterExceptionDocumentException
-
-