org.ops4j.pax.runner.daemon
Class Daemon

java.lang.Object
  extended by org.ops4j.pax.runner.daemon.Daemon

public class Daemon
extends java.lang.Object

The class that runs as Daemon for the Pax Runner. The DaemonLauncher launches the instance of this class either as an attached or a detached process. In either case, the instance of this class launches the Pax-Runner and waits for appropriate shutdown command to be issued on its shutdown port.
The Daemon process terminates either when the Pax-Runner completes execution, or when a shutdown command is issued via shutdown port.

Since:
0.20.0 (29 April 2009)
Author:
Thomas Joseph

Field Summary
static java.lang.String PASSWORD_FILE
          Configuration option to specify password file, if not specified, the name of the default password file.
 
Constructor Summary
Daemon()
           
 
Method Summary
static Daemon getInstance()
           
static boolean isDaemonStarted()
          Determines if any instance of the Daemon is already started.
 void load(java.lang.String... args)
          Prepares the instance of this class with configurations, before launching the Pax-Runner.
static void main(java.lang.String[] args)
          Launches a new Daemon instance, that will bring up the Pax Runner.
 void start()
          Starts the Daemon - Launches Pax Runner, Opens up shutdown port on which it will listen to shutdown command.
 void stop()
          Stops the running instance of the Daemon and Pax Runner if any.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PASSWORD_FILE

public static final java.lang.String PASSWORD_FILE
Configuration option to specify password file, if not specified, the name of the default password file.

See Also:
Constant Field Values
Constructor Detail

Daemon

public Daemon()
Method Detail

main

public static void main(java.lang.String[] args)
Launches a new Daemon instance, that will bring up the Pax Runner.


getInstance

public static Daemon getInstance()
Returns:
The singleton instance of the Daemon.

isDaemonStarted

public static boolean isDaemonStarted()
Determines if any instance of the Daemon is already started.

Returns:
True if any instance of this class is already started, false otherwise.

load

public void load(java.lang.String... args)
Prepares the instance of this class with configurations, before launching the Pax-Runner.

Parameters:
args - The arguments passed to start this instance.

start

public void start()
Starts the Daemon - Launches Pax Runner, Opens up shutdown port on which it will listen to shutdown command.


stop

public void stop()
Stops the running instance of the Daemon and Pax Runner if any.



Copyright © 2006-2011 OPS4J - Open Participation Software for Java. All Rights Reserved.