net.sf.xbus.bootstrap
Class ReceiverServiceWrapper

java.lang.Object
  extended by net.sf.xbus.bootstrap.ReceiverServiceWrapper
All Implemented Interfaces:
org.tanukisoftware.wrapper.WrapperListener

public class ReceiverServiceWrapper
extends java.lang.Object
implements org.tanukisoftware.wrapper.WrapperListener

Starts the ReceiverService as a background service, using the XBUSClassLoader.

It works together with the Java Service Wrapper from Silveregg Technologies to start it as a service in Windows NT, Linux or Solaris. This is an open-source packages which can be found at SourceForge.


Constructor Summary
ReceiverServiceWrapper()
           
 
Method Summary
 void controlEvent(int arg0)
          Called whenever the native wrapper code traps a system control signal against the Java process.
static void main(java.lang.String[] args)
          Start the application.
 java.lang.Integer start(java.lang.String[] arg0)
          Called when the WrapperManager is signaled by the native wrapper code that it can start its application.
 int stop(int arg0)
          Called when the application is shutting down.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReceiverServiceWrapper

public ReceiverServiceWrapper()
Method Detail

main

public static void main(java.lang.String[] args)
Start the application. If the JVM was launched from the native Wrapper then the application will wait for the native Wrapper to call the application's start method. Otherwise the start method will be called immediately.


start

public java.lang.Integer start(java.lang.String[] arg0)
Called when the WrapperManager is signaled by the native wrapper code that it can start its application. The ReceiverService will be started.

Specified by:
start in interface org.tanukisoftware.wrapper.WrapperListener
Parameters:
arg0 - not used
Returns:
NULL if the ReceiverService have been started, otherwise 1

stop

public int stop(int arg0)
Called when the application is shutting down. The ReceiverService will be stopped.

Specified by:
stop in interface org.tanukisoftware.wrapper.WrapperListener
Parameters:
arg0 - not used
Returns:
the exit code to actually return to the OS
(1 - if there are any problems during shutdown, otherwise 0).

controlEvent

public void controlEvent(int arg0)
Called whenever the native wrapper code traps a system control signal against the Java process. All signals will be ignored.

Specified by:
controlEvent in interface org.tanukisoftware.wrapper.WrapperListener