Java Code Examples for org.artofsolving.jodconverter.office.DefaultOfficeManagerConfiguration#setTaskQueueTimeout()
The following examples show how to use
org.artofsolving.jodconverter.office.DefaultOfficeManagerConfiguration#setTaskQueueTimeout() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OpenOfficePDFConverter.java From jeewx with Apache License 2.0 | 6 votes |
public static void startService() { DefaultOfficeManagerConfiguration configuration = new DefaultOfficeManagerConfiguration(); try { // 准备启动服务 configuration.setOfficeHome(OFFICE_HOME);// 设置OpenOffice.org安装目录 // 设置转换端口,默认为8100 configuration.setPortNumbers(port); // 设置任务执行超时为5分钟 configuration.setTaskExecutionTimeout(1000 * 60 * 5L); // 设置任务队列超时为24小时 configuration.setTaskQueueTimeout(1000 * 60 * 60 * 24L); officeManager = configuration.buildOfficeManager(); officeManager.start(); // 启动服务 org.jeecgframework.core.util.LogUtil.info("office转换服务启动成功!"); } catch (Exception ce) { org.jeecgframework.core.util.LogUtil.info("office转换服务启动失败!详细信息:" + ce); } }
Example 2
Source File: OpenOfficePDFConverter.java From jeecg with Apache License 2.0 | 6 votes |
public static void startService() { DefaultOfficeManagerConfiguration configuration = new DefaultOfficeManagerConfiguration(); try { // 准备启动服务 configuration.setOfficeHome(OFFICE_HOME);// 设置OpenOffice.org安装目录 // 设置转换端口,默认为8100 configuration.setPortNumbers(port); // 设置任务执行超时为5分钟 configuration.setTaskExecutionTimeout(1000 * 60 * 5L); // 设置任务队列超时为24小时 configuration.setTaskQueueTimeout(1000 * 60 * 60 * 24L); officeManager = configuration.buildOfficeManager(); officeManager.start(); // 启动服务 log.info("office转换服务启动成功!"); } catch (Exception ce) { log.info("office转换服务启动失败!详细信息:" + ce); } }
Example 3
Source File: OfficePDFConverter.java From sun-wordtable-read with Apache License 2.0 | 5 votes |
public static void startService(){ DefaultOfficeManagerConfiguration configuration = new DefaultOfficeManagerConfiguration(); try { System.out.println("准备启动服务...."); configuration.setOfficeHome(OPEN_OFFICE_HOME);//设置安装目录 configuration.setPortNumbers(OPEN_OFFICE_PORT); //设置端口 configuration.setTaskExecutionTimeout(1000 * 60 * 5L); configuration.setTaskQueueTimeout(1000 * 60 * 60 * 24L); officeManager = configuration.buildOfficeManager(); officeManager.start(); //启动服务 System.out.println("office转换服务启动成功!"); } catch (Exception ce) { System.out.println("office转换服务启动失败!详细信息:" + ce); } }
Example 4
Source File: Doc2DocxUtil.java From sun-wordtable-read with Apache License 2.0 | 5 votes |
public static void startService(){ DefaultOfficeManagerConfiguration configuration = new DefaultOfficeManagerConfiguration(); try { configuration.setOfficeHome(OPEN_OFFICE_HOME);//设置安装目录 configuration.setPortNumbers(OPEN_OFFICE_PORT); //设置端口 configuration.setTaskExecutionTimeout(1000 * 60 * 5L); configuration.setTaskQueueTimeout(1000 * 60 * 60 * 24L); officeManager = configuration.buildOfficeManager(); officeManager.start(); //启动服务 } catch (Exception ce) { System.out.println("office转换服务启动失败!详细信息:" + ce); } }
Example 5
Source File: OfficeDocumentConvertServer.java From sun-wordtable-read with Apache License 2.0 | 5 votes |
private void startService(String officeHome, int... ports) { DefaultOfficeManagerConfiguration configuration = new DefaultOfficeManagerConfiguration(); try { System.out.println("准备启动office服务...."); configuration.setOfficeHome(officeHome);// 设置安装目录 configuration.setPortNumbers(ports); // 设置端口 configuration.setTaskExecutionTimeout(1000 * 60 * 5L); configuration.setTaskQueueTimeout(1000 * 60 * 60 * 24L); officeManager = configuration.buildOfficeManager(); officeManager.start(); // 启动服务 System.out.println("office转换服务启动成功!"); } catch (Exception ce) { System.out.println("office转换服务启动失败!详细信息:" + ce); } }
Example 6
Source File: ViewOfficeTools.java From csustRepo with MIT License | 5 votes |
public synchronized OfficeManager newOfficeManager() { String officehome=ServletActionContext.getServletContext().getInitParameter("officehome"); int portnumbers=Integer.parseInt(ServletActionContext.getServletContext().getInitParameter("portnumbers")); DefaultOfficeManagerConfiguration configuration = new DefaultOfficeManagerConfiguration(); configuration.setOfficeHome(officehome);//设置OpenOffice.org安装目录 configuration.setPortNumbers(portnumbers); //设置转换端口,默认为8100 configuration.setTaskExecutionTimeout(1000 * 60 * 10L);//设置任务执行超时为5分钟 configuration.setTaskQueueTimeout(1000 * 60 * 60 * 24L);//设置任务队列超时为24小时 return configuration.buildOfficeManager(); }
Example 7
Source File: ContextListener.java From csustRepo with MIT License | 5 votes |
private void initViewOfficeTools(ServletContextEvent sce){ String officehome=sce.getServletContext().getInitParameter("officehome"); int portnumbers=Integer.parseInt(sce.getServletContext().getInitParameter("portnumbers")); DefaultOfficeManagerConfiguration configuration = new DefaultOfficeManagerConfiguration(); configuration.setOfficeHome(officehome);//设置OpenOffice.org安装目录 configuration.setPortNumbers(portnumbers); //设置转换端口,默认为8100 configuration.setTaskExecutionTimeout(1000 * 60 * 10L);//设置任务执行超时为5分钟 configuration.setTaskQueueTimeout(1000 * 60 * 60 * 24L);//设置任务队列超时为24小时 OfficeManager officeManager=configuration.buildOfficeManager(); officeManager.start(); ViewOfficeTools.newInstance().setOfficeManager(officeManager); }