Docmosis API 4.5.0

com.docmosis.document.converter
Class RemoteConverter

java.lang.Object
  extended bycom.docmosis.document.converter.RemoteConverter
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
RemoteConverterTerminus

public class RemoteConverter
extends Object
implements Runnable

This class launches a stand alone remote converter. It listens on a socket for conversion requests from Docmosis. This class is primarily to provide the main entry point so it can be run from the command line. It can be run programmatically also and implements Runnable so it can be easily launched into a separate thread. The shutdown() method can be called to shut it down.


 Usage:
  java com.docmosis.document.converter.RemoteConverter
  java com.docmosis.document.converter.RemoteConverter [-h]
  java com.docmosis.document.converter.RemoteConverter <port>
  java com.docmosis.document.converter.RemoteConverter <exe> <converterClass> <port>
   -h : print this usage
   <no args> : run the converter on port 2100 
   port : run the converter on the given port 
   exe converterClass port : set the executable, converter class and port to use

 

See Also:
RemoteConverterGateway

Constructor Summary
RemoteConverter(int port)
          Construct a remote converter listening on the given port, using defaults for other settings.
RemoteConverter(String converterClass, File executable, int port, SSLSocketSettings sslSettings)
          Construct a new RemoteConverter using the given ConverterClass, executable and port.
 
Method Summary
protected  void initialize()
           
static void main(String[] args)
           
 void run()
          Run this Converter.
 void shutdown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteConverter

public RemoteConverter(int port)
                throws IllegalArgumentException,
                       SecurityException,
                       ClassNotFoundException,
                       InstantiationException,
                       IllegalAccessException,
                       InvocationTargetException,
                       NoSuchMethodException,
                       IOException
Construct a remote converter listening on the given port, using defaults for other settings.

Parameters:
port - the port on which to listen
Throws:
IllegalArgumentException - if there is a parameter issue
SecurityException - if there is a security/class loading issue
ClassNotFoundException - if there is a security/class loading issue
InstantiationException - if there is a security/class loading issue
IllegalAccessException - if there is a security/class loading issue
InvocationTargetException - if there is a security/class loading issue
NoSuchMethodException - if there is a security/class loading issue
IOException - if there is an IO problem

RemoteConverter

public RemoteConverter(String converterClass,
                       File executable,
                       int port,
                       SSLSocketSettings sslSettings)
                throws IllegalArgumentException,
                       SecurityException,
                       ClassNotFoundException,
                       InstantiationException,
                       IllegalAccessException,
                       InvocationTargetException,
                       NoSuchMethodException,
                       IOException
Construct a new RemoteConverter using the given ConverterClass, executable and port.

Parameters:
converterClass - the concrete implementation of the converter class.
executable - the path to the soffice/soffice.exe executable.
port - the port number to listen upon
sslSettings - the ssl settings to use. If null, ssl will not be applied.
Throws:
IllegalArgumentException - if there is a parameter issue
SecurityException - if there is a security/class loading issue
ClassNotFoundException - if there is a security/class loading issue
InstantiationException - if there is a security/class loading issue
IllegalAccessException - if there is a security/class loading issue
InvocationTargetException - if there is a security/class loading issue
NoSuchMethodException - if there is a security/class loading issue
IOException - if there is an IO problem
Method Detail

initialize

protected void initialize()
                   throws IllegalArgumentException,
                          SecurityException,
                          ClassNotFoundException,
                          InstantiationException,
                          IllegalAccessException,
                          InvocationTargetException,
                          NoSuchMethodException,
                          IOException
Throws:
IllegalArgumentException
SecurityException
ClassNotFoundException
InstantiationException
IllegalAccessException
InvocationTargetException
NoSuchMethodException
IOException

run

public void run()
Run this Converter.

Specified by:
run in interface Runnable

shutdown

public void shutdown()

main

public static void main(String[] args)
                 throws ClassNotFoundException,
                        IllegalArgumentException,
                        SecurityException,
                        InstantiationException,
                        IllegalAccessException,
                        InvocationTargetException,
                        NoSuchMethodException,
                        IOException
Throws:
ClassNotFoundException
IllegalArgumentException
SecurityException
InstantiationException
IllegalAccessException
InvocationTargetException
NoSuchMethodException
IOException

Docmosis API 4.5.0

Copyright © 2014 Docmosis Pty Ltd. All Rights Reserved.