org.exolab.jmscts.core.service
Class MessengerService
java.lang.Object
|
+--org.exolab.core.service.Service
|
+--org.exolab.jmscts.core.service.MessengerService
- All Implemented Interfaces:
- java.util.EventListener, ExecutionListener, java.io.Serializable, org.exolab.core.service.Serviceable
- public class MessengerService
- extends org.exolab.core.service.Service
- implements ExecutionListener
This class enables messaging operations to be performed in a separate
JVM
This service is dependent on the
RmiRegistryService
and
ExecutionMonitorService
. These must be initialised prior to
starting this service
- Version:
- $Revision: 1.2 $ $Date: 2004/02/02 03:49:20 $
- Author:
- Tim Anderson
- See Also:
- Serialized Form
Field Summary |
static java.lang.String |
NAME
The service name |
Method Summary |
void |
error(java.lang.Throwable throwable)
Event handler invoked when the application throws an exception just
prior to termination |
void |
failed(java.lang.Throwable throwable)
Event handler invoked if the application cannot be started |
void |
start()
Start the service |
void |
started()
Event handler invoked when the application starts |
void |
stop()
Stop the service |
void |
stopped(int status)
Event handler invoked when the application stops |
Methods inherited from class org.exolab.core.service.Service |
getName, getState, restart, setState, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
NAME
public static final java.lang.String NAME
- The service name
MessengerService
public MessengerService(int port)
- Construct a new
MessengerService
- Parameters:
port
- the RMI registry port
start
public void start()
throws org.exolab.core.service.ServiceException
- Start the service
- Overrides:
start
in class org.exolab.core.service.Service
- Throws:
org.exolab.core.service.ServiceException
- if the service can't be started
stop
public void stop()
throws org.exolab.core.service.ServiceException
- Stop the service
- Overrides:
stop
in class org.exolab.core.service.Service
- Throws:
org.exolab.core.service.ServiceException
- if the service can't be stopped
failed
public void failed(java.lang.Throwable throwable)
- Event handler invoked if the application cannot be started
- Specified by:
failed
in interface ExecutionListener
- Parameters:
throwable
- the exception thrown by the application
started
public void started()
- Event handler invoked when the application starts
- Specified by:
started
in interface ExecutionListener
stopped
public void stopped(int status)
- Event handler invoked when the application stops
- Specified by:
stopped
in interface ExecutionListener
- Parameters:
status
- the exit status of the application
error
public void error(java.lang.Throwable throwable)
- Event handler invoked when the application throws an exception just
prior to termination
- Specified by:
error
in interface ExecutionListener
- Parameters:
throwable
- the exception thrown by the application
Copyright © 2001-2004 JMS CTS Team. All Rights Reserved.