public class JodConverterBean extends Object implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
The Controller shall launch the OO processes. The Controller shall stop the OO processes when it´s time to shutdown the application
Constructor and Description |
---|
JodConverterBean() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
void |
destroy() |
org.jodconverter.DocumentConverter |
getConverter()
Gets the
DocumentConverter created by this bean. |
void |
logAvailableFormats()
Prints the available formats provided by the JODConverter module.
|
void |
setKillExistingProcess(Boolean killExistingProcess)
Sets whether an existing office process is killed when starting a new office process for the
same connection string.
|
void |
setMaxTasksPerProcess(Integer maxTasksPerProcess)
Sets the maximum number of tasks an office process can execute before restarting.
|
void |
setOfficeHome(String officeHome)
Sets the office home directory (office installation).
|
void |
setPortNumbers(String portNumbers)
Sets the list of ports, separated by commas, used by each JODConverter processing thread.
|
void |
setProcessRetryInterval(Long processRetryInterval)
Specifies the delay, in milliseconds, between each try when trying to execute an office process
call (start/terminate).
|
void |
setProcessTimeout(Long processTimeout)
Sets the timeout, in milliseconds, when trying to execute an office process call
(start/terminate).
|
void |
setTaskExecutionTimeout(Long taskExecutionTimeout)
Sets the maximum time allowed to process a task.
|
void |
setTaskQueueTimeout(Long taskQueueTimeout)
Sets the maximum living time of a task in the conversion queue.
|
void |
setTemplateProfileDir(String templateProfileDir)
Sets the directory to copy to the temporary office profile directories to be created.
|
void |
setWorkingDir(String workingDir)
Sets the directory where temporary office profile directories will be created.
|
public void afterPropertiesSet() throws org.jodconverter.office.OfficeException
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
org.jodconverter.office.OfficeException
public org.jodconverter.DocumentConverter getConverter()
DocumentConverter
created by this bean.public void destroy()
destroy
in interface org.springframework.beans.factory.DisposableBean
public void logAvailableFormats()
public void setKillExistingProcess(Boolean killExistingProcess)
Default: true
killExistingProcess
- true
to kill existing process when a new process must be
created with the same connection string, false
otherwise.public void setMaxTasksPerProcess(Integer maxTasksPerProcess)
maxTasksPerProcess
- the new value to set.public void setOfficeHome(String officeHome)
officeHome
- the new home directory to set.public void setPortNumbers(String portNumbers)
portNumbers
- the port numbers to use.public void setProcessRetryInterval(Long processRetryInterval)
Default: 250 (0.25 seconds)
processRetryInterval
- the retry interval, in milliseconds.public void setProcessTimeout(Long processTimeout)
Default: 120000 (2 minutes)
processTimeout
- the process timeout, in milliseconds.public void setTaskExecutionTimeout(Long taskExecutionTimeout)
Default: 120000 (2 minutes)
taskExecutionTimeout
- The task execution timeout, in milliseconds.public void setTaskQueueTimeout(Long taskQueueTimeout)
Default: 30000 (30 seconds)
taskQueueTimeout
- The task queue timeout, in milliseconds.public void setTemplateProfileDir(String templateProfileDir)
templateProfileDir
- The new template profile directory.public void setWorkingDir(String workingDir)
Default: The system temporary directory as specified by the
java.io.tmpdir
system property.
workingDir
- The new working directory to set.