|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectes.caib.ibkey.oppenoffice.helper.BootstrapConnector
public class BootstrapConnector
A bootstrap connector which handles a connection to an OOo server. Most of the source code in this class has been taken from the Java class "Bootstrap.java" (Revision: 1.15) from the UDK projekt (Uno Software Develop- ment Kit) from OpenOffice.org (http://udk.openoffice.org/). The source code is available for example through a browser based online version control access at http://udk.openoffice.org/source/browse/udk/. The Java class "Bootstrap.java" is there available at http://udk.openoffice.org/source/browse/udk/javaunohelper/com/sun/star/comp/helper/Bootstrap.java?view=markup The idea to develop this BootstrapConnector comes from the blog "Getting started with the OpenOffice.org API part III : starting OpenOffice.org with jars not in the OOo install dir by Wouter van Reeven" (http://technology.amis.nl/blog/?p=1284) and from various posts in the "(Unofficial) OpenOffice.org Forum" at http://www.oooforum.org/ and the "OpenOffice.org Community Forum" at http://user.services.openoffice.org/ complaining about "no office executable found!". Modified by Pere Joseph 02-09-2009 to allow concurrency with one instance of openoffice and clean resources on disconect
| Field Summary |
|---|
| Fields inherited from interface com.sun.star.frame.XTerminateListener |
|---|
UNOTYPEINFO |
| Constructor Summary | |
|---|---|
BootstrapConnector(OOoServer oooServer)
Constructs a bootstrap connector which connects to the specified OOo server. |
|
BootstrapConnector(java.lang.String oooExecFolder)
Constructs a bootstrap connector which uses the folder of the OOo installation containing the soffice executable. |
|
| Method Summary | |
|---|---|
static com.sun.star.uno.XComponentContext |
bootstrap(java.lang.String oooExecFolder,
java.lang.String oooAcceptOption,
java.lang.String oooConnectionString)
Bootstraps a connection to an OOo server in the specified soffice executable folder of the OOo installation using the specified accept option and connection string and returns a component context for using the connection to the OOo server. |
com.sun.star.uno.XComponentContext |
connect(java.lang.String oooAcceptOption,
java.lang.String oooConnectionString)
Connects to an OOo server using the specified accept option and connection string and returns a component context for using the connection to the OOo server. |
void |
disconnect()
Disconnects from an OOo server using the connection string from the previous connect. |
void |
disposing(com.sun.star.lang.EventObject arg0)
|
void |
kill()
Kills the OpenOffice instance |
void |
notifyTermination(com.sun.star.lang.EventObject arg0)
Handles termination notification after it can be cancelled |
void |
queryTermination(com.sun.star.lang.EventObject arg0)
Handles termination notification, and here is allowed to cancel the termination |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BootstrapConnector(java.lang.String oooExecFolder)
oooExecFoder - The folder of the OOo installation containing the soffice executablepublic BootstrapConnector(OOoServer oooServer)
oooServer - The OOo server| Method Detail |
|---|
public com.sun.star.uno.XComponentContext connect(java.lang.String oooAcceptOption,
java.lang.String oooConnectionString)
throws com.sun.star.comp.helper.BootstrapException
oooAcceptOption - The accept optionoooConnectionString - The connection string
com.sun.star.comp.helper.BootstrapExceptionpublic void disconnect()
public void kill()
public static final com.sun.star.uno.XComponentContext bootstrap(java.lang.String oooExecFolder,
java.lang.String oooAcceptOption,
java.lang.String oooConnectionString)
throws com.sun.star.comp.helper.BootstrapException
oooExecFolder - The folder of the OOo installation containing the soffice executableoooAcceptOption - The accept optionoooConnectionString - The connection string
com.sun.star.comp.helper.BootstrapExceptionpublic void notifyTermination(com.sun.star.lang.EventObject arg0)
notifyTermination in interface com.sun.star.frame.XTerminateListener
public void queryTermination(com.sun.star.lang.EventObject arg0)
throws com.sun.star.frame.TerminationVetoException
queryTermination in interface com.sun.star.frame.XTerminateListenercom.sun.star.frame.TerminationVetoExceptionpublic void disposing(com.sun.star.lang.EventObject arg0)
disposing in interface com.sun.star.lang.XEventListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||