public static final class LocalOfficeManager.Builder extends org.jodconverter.core.office.AbstractOfficeManagerPool.AbstractOfficeManagerPoolBuilder<LocalOfficeManager.Builder>
LocalOfficeManager.LocalOfficeManager| Modifier and Type | Method and Description |
|---|---|
@NonNull LocalOfficeManager.Builder |
afterStartProcessDelay(@Nullable Long afterStartProcessDelay)
Specifies the delay, in milliseconds, after an attempt to start an office process before
doing anything else.
|
@NonNull LocalOfficeManager |
build() |
@NonNull LocalOfficeManager.Builder |
disableOpengl(@Nullable Boolean disableOpengl)
Specifies whether OpenGL must be disabled when starting a new office process.
|
@NonNull LocalOfficeManager.Builder |
existingProcessAction(@Nullable ExistingProcessAction existingProcessAction)
Specifies the action that must be taken when starting a new office process and there already
is an existing running process for the same connection string.
|
@NonNull LocalOfficeManager.Builder |
hostName(String hostName)
Specifies host name that will be use in the --accept argument when starting an office
process.
|
@NonNull LocalOfficeManager.Builder |
keepAliveOnShutdown(@Nullable Boolean keepAliveOnShutdown)
Controls whether the manager will keep the office process alive on shutdown.
|
@NonNull LocalOfficeManager.Builder |
maxTasksPerProcess(@Nullable Integer maxTasksPerProcess)
Specifies the maximum number of tasks an office process can execute before restarting.
|
@NonNull LocalOfficeManager.Builder |
officeHome(@Nullable File officeHome)
Specifies the office home directory (office installation).
|
@NonNull LocalOfficeManager.Builder |
officeHome(@Nullable String officeHome)
Specifies the office home directory (office installation).
|
@NonNull LocalOfficeManager.Builder |
pipeNames(String... pipeNames)
Specifies the pipe names that will be used to communicate with office.
|
@NonNull LocalOfficeManager.Builder |
portNumbers(int... portNumbers)
Specifies the port numbers that will be used to communicate with office.
|
@NonNull LocalOfficeManager.Builder |
processManager(@Nullable ProcessManager processManager)
Provides a specific
ProcessManager implementation to be used when dealing with an
office process (retrieve PID, kill process). |
@NonNull LocalOfficeManager.Builder |
processManager(@Nullable String processManagerClass)
Provides a custom
ProcessManager implementation, which may not be included in the
standard JODConverter distribution. |
@NonNull LocalOfficeManager.Builder |
processRetryInterval(@Nullable Long processRetryInterval)
Specifies the delay, in milliseconds, between each try when trying to execute an office
process call (start/terminate).
|
@NonNull LocalOfficeManager.Builder |
processTimeout(@Nullable Long processTimeout)
Specifies the timeout, in milliseconds, when trying to execute an office process call
(start/terminate).
|
@NonNull LocalOfficeManager.Builder |
runAsArgs(String... runAsArgs)
Specifies the sudo arguments that will be used with unix commands.
|
@NonNull LocalOfficeManager.Builder |
startFailFast(@Nullable Boolean startFailFast)
Controls whether the manager will "fail fast" if an office process cannot be started or the
connection to the started process fails.
|
@NonNull LocalOfficeManager.Builder |
templateProfileDir(@Nullable File templateProfileDir)
Specifies the directory to copy to the temporary office profile directories to be created.
|
@NonNull LocalOfficeManager.Builder |
templateProfileDir(@Nullable String templateProfileDir)
Specifies the directory to copy to the temporary office profile directories to be created.
|
@NonNull LocalOfficeManager.Builder |
templateProfileDirOrDefault(@Nullable File templateProfileDir)
Specifies the directory to copy to the temporary office profile directories to be created.
|
@NonNull LocalOfficeManager.Builder |
templateProfileDirOrDefault(@Nullable String templateProfileDir)
Specifies the directory to copy to the temporary office profile directories to be created.
|
public @NonNull LocalOfficeManager build()
build in class org.jodconverter.core.office.AbstractOfficeManagerPool.AbstractOfficeManagerPoolBuilder<LocalOfficeManager.Builder>public @NonNull LocalOfficeManager.Builder pipeNames(String... pipeNames)
pipeNames - The pipe names to use.public @NonNull LocalOfficeManager.Builder hostName(String hostName)
localhost instead may work.
Default: 127.0.0.1
hostName - The host name to use.public @NonNull LocalOfficeManager.Builder portNumbers(int... portNumbers)
portNumbers - The port numbers to use.public @NonNull LocalOfficeManager.Builder officeHome(@Nullable File officeHome)
officeHome - The new home directory to set.public @NonNull LocalOfficeManager.Builder officeHome(@Nullable String officeHome)
officeHome - The new home directory to set.public @NonNull LocalOfficeManager.Builder processManager(@Nullable ProcessManager processManager)
ProcessManager implementation to be used when dealing with an
office process (retrieve PID, kill process).processManager - The provided process manager.public @NonNull LocalOfficeManager.Builder processManager(@Nullable String processManagerClass)
ProcessManager implementation, which may not be included in the
standard JODConverter distribution.processManagerClass - Type of the provided process manager. The class must implement the
ProcessManager interface, must be on the classpath (or more specifically
accessible from the current classloader) and must have a default public constructor (no
argument).ProcessManager,
AbstractProcessManagerpublic @NonNull LocalOfficeManager.Builder runAsArgs(String... runAsArgs)
runAsArgs - The sudo arguments for a unix os.public @NonNull LocalOfficeManager.Builder templateProfileDir(@Nullable File templateProfileDir)
templateProfileDir - The new template profile directory.public @NonNull LocalOfficeManager.Builder templateProfileDir(@Nullable String templateProfileDir)
templateProfileDir - The new template profile directory.public @NonNull LocalOfficeManager.Builder templateProfileDirOrDefault(@Nullable File templateProfileDir)
templateProfileDir - The new template profile directory.public @NonNull LocalOfficeManager.Builder templateProfileDirOrDefault(@Nullable String templateProfileDir)
templateProfileDir - The new template profile directory.public @NonNull LocalOfficeManager.Builder processTimeout(@Nullable Long processTimeout)
Default: 120000 (2 minutes)
processTimeout - The process timeout, in milliseconds.public @NonNull LocalOfficeManager.Builder processRetryInterval(@Nullable Long processRetryInterval)
Default: 250 (0.25 seconds)
processRetryInterval - The retry interval, in milliseconds.public @NonNull LocalOfficeManager.Builder afterStartProcessDelay(@Nullable Long afterStartProcessDelay)
Default: 0 (no delay). On FreeBSD, which is a known OS needing this, it defaults to 2000 (2 seconds).
afterStartProcessDelay - The delay, in milliseconds.public @NonNull LocalOfficeManager.Builder existingProcessAction(@Nullable ExistingProcessAction existingProcessAction)
Default: ExistingProcessAction.KILL
existingProcessAction - The existing process action.public @NonNull LocalOfficeManager.Builder startFailFast(@Nullable Boolean startFailFast)
true, the start of a process will
wait for the task to be completed, and will throw an exception if the office process is not
started successfully or if the connection to the started process fails. If set to false, the task of starting the process and connecting to it will be submitted and will
return immediately, meaning a faster starting process. Only error logs will be produced if
anything goes wrong.
Default: false
startFailFast - true to "fail fast", false otherwise.public @NonNull LocalOfficeManager.Builder keepAliveOnShutdown(@Nullable Boolean keepAliveOnShutdown)
true, the stop task will only disconnect from the office process, which will stay alive. If
set to false, the office process will be stopped gracefully (or killed if could not
been stopped gracefully).
Default: false
keepAliveOnShutdown - true to keep the process alive, false otherwise.public @NonNull LocalOfficeManager.Builder disableOpengl(@Nullable Boolean disableOpengl)
Default: false
disableOpengl - true to disable OpenGL, false otherwise.public @NonNull LocalOfficeManager.Builder maxTasksPerProcess(@Nullable Integer maxTasksPerProcess)
Default: 200
maxTasksPerProcess - The new maximum number of tasks an office process can execute.Copyright © 2022 - present; JODConverter. All rights reserved.