Nuxeo Enterprise Platform 5.3

com.anwrt.ooserver.daemon
Class Daemon

java.lang.Object
  extended by com.anwrt.ooserver.daemon.Daemon

public class Daemon
extends Object

Main Open Office daemon class.
There are two entry points :
- you can run it from java using constructors to have one instance
- or using command line (see CommandLine for more informations)
warning if there is no output, do not forget to instantiate the logger, (ex : Logger.newInstance(new LoggerBasicImpl());) otherwise the logger will not be enabled.

Author:
Jounayd Id Salah
See Also:
CommandLine

Field Summary
static float VERSION
           
static String VERSION_TYPE
           
 
Constructor Summary
Daemon(Config config)
          Creates a daemon and initialize it.
Daemon(String configPath)
          same as Daemon(Config), but the configuration will be read from an xml file;
 
Method Summary
static String extractContactInfo(String namevalue)
           
 void fillProcessPool()
          Creates all server instances at once.
 com.sun.star.bridge.XBridgeFactory getBridgeFactory()
           
 Config getConfig()
          get daemon current configuration
 com.sun.star.uno.XComponentContext getInitialContext()
           
 ProcessPool getPool()
          Get the Open Office server instance manager
static String getVersionString()
          returns current version
 boolean isShutdowned()
          used to know when the daemon called the shutdown method (basically to avoid unnecessary exceptions)
static void main(String[] args)
          Command line version of the daemon
 void run()
          The entry method of the daemon, it calls init and mainLoop methods.
 void shutdown()
          called to shutdown the daemon (all the terminating code is not included into this method, there might be other code elsewhere such as in run() )
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static final float VERSION
See Also:
Constant Field Values

VERSION_TYPE

public static final String VERSION_TYPE
See Also:
Constant Field Values
Constructor Detail

Daemon

public Daemon(Config config)
Creates a daemon and initialize it. Then the daemon is waiting to be run.

Parameters:
config - daemon's configuration

Daemon

public Daemon(String configPath)
same as Daemon(Config), but the configuration will be read from an xml file;

Parameters:
configPath - an xml file describing the configuration
Method Detail

getVersionString

public static String getVersionString()
returns current version

Returns:
"x.x type" (ex : "1.0 beta")

getPool

public ProcessPool getPool()
Get the Open Office server instance manager

Returns:
ProcessPool class that manage server instances

getInitialContext

public com.sun.star.uno.XComponentContext getInitialContext()

getBridgeFactory

public com.sun.star.bridge.XBridgeFactory getBridgeFactory()

getConfig

public Config getConfig()
get daemon current configuration

Returns:
daemon configuration

isShutdowned

public boolean isShutdowned()
used to know when the daemon called the shutdown method (basically to avoid unnecessary exceptions)

Returns:
true if the daemon is in a shutdown process (shutdown method just called and finished)

shutdown

public void shutdown()
called to shutdown the daemon (all the terminating code is not included into this method, there might be other code elsewhere such as in run() )


extractContactInfo

public static String extractContactInfo(String namevalue)

fillProcessPool

public void fillProcessPool()
Creates all server instances at once. There is one instance per user installation (OpenOffice server doesn't allow multithreading, it's unstable). The total number of users allowed in parallel is the number of user installations.


run

public void run()
The entry method of the daemon, it calls init and mainLoop methods.


main

public static void main(String[] args)
Command line version of the daemon

Parameters:
args - described in CommandLine
See Also:
CommandLine

Nuxeo Enterprise Platform 5.3

Copyright © 2010 Nuxeo SAS. All Rights Reserved.