org.exolab.jms.service
Class BasicService

java.lang.Object
  |
  +--org.exolab.jms.service.Service
        |
        +--org.exolab.jms.service.BasicService
All Implemented Interfaces:
java.lang.Runnable, Serviceable
Direct Known Subclasses:
BasicEventManager, LeaseManager

public abstract class BasicService
extends Service
implements java.lang.Runnable

BasicService is a service implementation that will run the service in a separate thread. Derived class must define an implementation for the 'run' method.

Version:
$Revision: 1.2 $ $Date: 2005/08/30 04:56:14 $
Author:
Jim Alateras, Tim Anderson
See Also:
Service

Constructor Summary
BasicService()
          Construct a new BasicService with no name.
BasicService(java.lang.String name)
          Construct a new BasicService, specifying its name.
 
Method Summary
protected  void doStart()
          Start the service.
protected  void doStop()
          Stop the service.
 java.lang.String toString()
          Return the state of the object as a string.
 
Methods inherited from class org.exolab.jms.service.Service
getName, isStarted, restart, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.lang.Runnable
run
 

Constructor Detail

BasicService

public BasicService()
Construct a new BasicService with no name.

BasicService

public BasicService(java.lang.String name)
Construct a new BasicService, specifying its name.
Parameters:
name - the name of the service
Method Detail

toString

public java.lang.String toString()
Return the state of the object as a string.
Overrides:
toString in class Service
Returns:
a string form of the object state

doStart

protected void doStart()
                throws ServiceException
Start the service.
Overrides:
doStart in class Service
Following copied from class: org.exolab.jms.service.Service
Throws:
ServiceException - if the service fails to start

doStop

protected void doStop()
               throws ServiceException
Stop the service.
Overrides:
doStop in class Service
Following copied from class: org.exolab.jms.service.Service
Throws:
ServiceException - if the service fails to stop


Copyright © 1999-2007 The OpenJMS Group. All Rights Reserved.