public class OfficeProcess extends Object
| Constructor and Description |
|---|
OfficeProcess(UnoUrl unoUrl)
使用默认配置为指定的URL构造office流程类的新实例.
|
OfficeProcess(UnoUrl unoUrl,
OfficeProcessBuilder config)
使用指定的配置构造office流程类的新实例.
|
| Modifier and Type | Method and Description |
|---|---|
void |
deleteInstanceProfileDir()
删除office进程的配置文件目录
|
int |
forciblyTerminate(long retryInterval,
long retryTimeout)
终止office流程实例.
|
Integer |
getExitCode()
获取office进程的退出码.
|
int |
getExitCode(long retryInterval,
long retryTimeout)
获取office进程的退出码。我们将尝试获取退出代码,直到成功或达到指定的超时为止.
|
boolean |
isRunning()
获取office进程是否正在运行.
|
void |
start()
启动office流程.
|
void |
start(boolean restart)
启动office流程.
|
public OfficeProcess(UnoUrl unoUrl)
unoUrl - 为其创建流程的URL.public OfficeProcess(UnoUrl unoUrl, OfficeProcessBuilder config)
unoUrl - 为其创建流程的URL.config - 流程配置.public void deleteInstanceProfileDir()
public int forciblyTerminate(long retryInterval,
long retryTimeout)
throws InstrumentException
retryInterval - 每次退出码检索尝试之间的间隔.retryTimeout - 超时之后,我们将不再尝试检索退出码.InstrumentException - 如果我们无法获得进程的退出码.public Integer getExitCode()
null.public int getExitCode(long retryInterval,
long retryTimeout)
throws InstrumentException
retryInterval - 每次退出码检索尝试之间的间隔.retryTimeout - 超时之后,我们将不再尝试检索退出码.InstrumentException - 如果无法获得进程的退出码.public boolean isRunning()
true 是正在运行的office进程;false 否则public void start()
throws InstrumentException
InstrumentException - 如果无法启动office进程.public void start(boolean restart)
throws InstrumentException
restart - 判断是否需要重新启动,重新启动将假定实例配置文件目录已经创建
如果要重新创建实例配置文件目录,应该将restart设置为falseInstrumentException - 如果无法启动office进程.Copyright © 2019. All rights reserved.