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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
convert
(Document document, OutputStream outputStream) Converts a given document and output results in provided output stream.byte[]
remoteConvert
(Document document) protected abstract void
run
(Document document, OutputStream outputStream) protected static void
startRemoteConverter
(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
-
Constructor Details
-
AbstractRemoteConverter
public AbstractRemoteConverter()
-
-
Method Details
-
run
protected abstract void run(Document document, OutputStream outputStream) throws IOException, ConverterException, DocumentException -
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 IOException, ConverterException, DocumentException -
convert
public void convert(Document document, OutputStream outputStream) throws IOException, ConverterException, DocumentException Description copied from interface:Converter
Converts a given document and output results in provided output stream.- Specified by:
convert
in 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:
IOException
ConverterException
DocumentException
-