public class OpenOfficeConnectionTester
extends org.springframework.extensions.surf.util.AbstractLifecycleBean
net.sf.jooreports.openoffice.connection.OpenOfficeConnection implementations.| Modifier and Type | Class and Description |
|---|---|
static class |
OpenOfficeConnectionTester.OpenOfficeConnectionTesterJob
Quartz job that checks an OpenOffice connection.
|
| Constructor and Description |
|---|
OpenOfficeConnectionTester() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
onBootstrap(org.springframework.context.ApplicationEvent event) |
protected void |
onShutdown(org.springframework.context.ApplicationEvent event)
Disconnect
|
void |
setConnection(net.sf.jooreports.openoffice.connection.OpenOfficeConnection connection) |
void |
setStrict(boolean strict) |
boolean |
testAndConnect() |
java.lang.Boolean |
testAndConnectNoQueuing()
Calls
OpenOfficeConnectionTester.testAndConnect() if no other Threads are currently calling it. |
public void setConnection(net.sf.jooreports.openoffice.connection.OpenOfficeConnection connection)
connection - the OpenOffice connection.public void setStrict(boolean strict)
strict - set to true to generate a failure if the connection is not connected
during the connection check, or false to just issue
a warning. The default is false.protected void onBootstrap(org.springframework.context.ApplicationEvent event)
onBootstrap in class org.springframework.extensions.surf.util.AbstractLifecycleBeanOpenOfficeConnectionTester.checkConnection()protected void onShutdown(org.springframework.context.ApplicationEvent event)
onShutdown in class org.springframework.extensions.surf.util.AbstractLifecycleBeanpublic java.lang.Boolean testAndConnectNoQueuing()
OpenOfficeConnectionTester.testAndConnect() if no other Threads are currently calling it.
As a result we should NOT get a queue of Threads from the Quartz scheduler hanging
one after another, if OpenOffice is taking a long time responding or waiting for the
connection timeout. This way we get one timeout rather than multiple timeouts. ALF-15406OpenOfficeConnectionTester.testAndConnect().public boolean testAndConnect()
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.