public final class ExternalOfficeManager extends Object
OfficeManager implementation that connects to an external Office process.
The external Office process needs to be started manually, e.g. from the command line with
soffice -accept="socket,host=127.0.0.1,port=2002;urp;"
Since this implementation does not manage the Office process, it does not support auto-restarting the process if it exits unexpectedly.
It will however auto-reconnect to the external process if the latter is manually restarted.
This OfficeManager implementation basically provides the same behavior as JODConverter
2.x, including using synchronized blocks for serializing office operations.
| Modifier and Type | Class and Description |
|---|---|
static class |
org.jodconverter.office.AbstractOfficeManager.AbstractOfficeManagerBuilder<B extends org.jodconverter.office.AbstractOfficeManager.AbstractOfficeManagerBuilder<B>> |
static class |
ExternalOfficeManager.Builder
A builder for constructing a
ExternalOfficeManager. |
| Modifier and Type | Field and Description |
|---|---|
protected org.jodconverter.office.OfficeManagerConfig |
config |
static long |
DEFAULT_CONNECT_TIMEOUT
The default timeout when connecting to office.
|
static long |
DEFAULT_INITIAL_DELAY
The default initial delay when connecting to office.
|
static String |
DEFAULT_PIPE_NAME
The default pipe name to connect to office.
|
static int |
DEFAULT_PORT_NUMBER
The default port number to connect to office.
|
static long |
DEFAULT_RETRY_INTERVAL
The default delay between each try to connect.
|
static long |
MAX_RETRY_INTERVAL
The maximum value for the delay between each try to connect.
|
| Modifier and Type | Method and Description |
|---|---|
static ExternalOfficeManager.Builder |
builder()
Creates a new builder instance.
|
protected void |
deleteTempDir() |
void |
execute(org.jodconverter.task.OfficeTask task) |
static ExternalOfficeManager |
install()
Creates a new
ExternalOfficeManager with default configuration. |
boolean |
isRunning() |
static ExternalOfficeManager |
make()
Creates a new
ExternalOfficeManager with default configuration. |
protected void |
makeTempDir() |
protected static File |
makeTempDir(File arg0) |
File |
makeTemporaryFile() |
File |
makeTemporaryFile(String arg0) |
void |
start() |
void |
stop() |
public static final int DEFAULT_PORT_NUMBER
public static final String DEFAULT_PIPE_NAME
public static final long DEFAULT_INITIAL_DELAY
public static final long DEFAULT_CONNECT_TIMEOUT
public static final long DEFAULT_RETRY_INTERVAL
public static final long MAX_RETRY_INTERVAL
protected final org.jodconverter.office.OfficeManagerConfig config
public static ExternalOfficeManager.Builder builder()
public static ExternalOfficeManager make()
ExternalOfficeManager with default configuration.ExternalOfficeManager with default configuration.public static ExternalOfficeManager install()
ExternalOfficeManager with default configuration. The created manager
will then be the unique instance of the InstalledOfficeManagerHolder class. Note that
if the InstalledOfficeManagerHolder class already holds an OfficeManager
instance, the owner of this existing manager is responsible to stopped it.ExternalOfficeManager with default configuration.public void execute(org.jodconverter.task.OfficeTask task)
throws org.jodconverter.office.OfficeException
org.jodconverter.office.OfficeExceptionpublic boolean isRunning()
public void start()
throws org.jodconverter.office.OfficeException
org.jodconverter.office.OfficeExceptionpublic void stop()
public File makeTemporaryFile()
makeTemporaryFile in interface org.jodconverter.office.TemporaryFileMakerpublic File makeTemporaryFile(String arg0)
makeTemporaryFile in interface org.jodconverter.office.TemporaryFileMakerprotected void makeTempDir()
protected void deleteTempDir()