public final class ExternalOfficeManager
extends org.jodconverter.core.office.AbstractOfficeManager
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 |
ExternalOfficeManager.Builder
A builder for constructing a
ExternalOfficeManager . |
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_CONNECT_ON_START |
static long |
DEFAULT_CONNECT_TIMEOUT |
static long |
DEFAULT_INITIAL_DELAY |
static String |
DEFAULT_PIPE_NAME |
static int |
DEFAULT_PORT_NUMBER |
static long |
DEFAULT_RETRY_INTERVAL |
static long |
MAX_RETRY_INTERVAL |
Modifier and Type | Method and Description |
---|---|
static @NonNull ExternalOfficeManager.Builder |
builder()
Creates a new builder instance.
|
void |
execute(@NonNull org.jodconverter.core.task.OfficeTask task) |
static @NonNull ExternalOfficeManager |
install()
Creates a new
ExternalOfficeManager with default configuration. |
boolean |
isRunning() |
static @NonNull ExternalOfficeManager |
make()
Creates a new
ExternalOfficeManager with default configuration. |
void |
start() |
void |
stop() |
public static final int DEFAULT_PORT_NUMBER
public static final String DEFAULT_PIPE_NAME
public static final boolean DEFAULT_CONNECT_ON_START
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
public static @NonNull ExternalOfficeManager.Builder builder()
public static @NonNull ExternalOfficeManager make()
ExternalOfficeManager
with default configuration.ExternalOfficeManager
with default configuration.public static @NonNull 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(@NonNull org.jodconverter.core.task.OfficeTask task) throws org.jodconverter.core.office.OfficeException
org.jodconverter.core.office.OfficeException
public boolean isRunning()
public void start() throws org.jodconverter.core.office.OfficeException
org.jodconverter.core.office.OfficeException
public void stop()
Copyright © 2016 - present; JODConverter.org. All rights reserved.