org.mortbay.jetty.plus
Class AbstractService
java.lang.Object
|
+--org.mortbay.jetty.plus.AbstractService
- All Implemented Interfaces:
- LifeCycle, Service
- Direct Known Subclasses:
- MailService, TMService
- public abstract class AbstractService
- extends java.lang.Object
- implements Service
Method Summary |
java.lang.String |
getJNDI()
|
java.lang.String |
getName()
|
boolean |
isStarted()
|
void |
setJNDI(java.lang.String registration)
|
void |
setName(java.lang.String name)
|
void |
start()
Start the LifeCycle. |
void |
stop()
Stop the LifeCycle. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractService
public AbstractService()
setJNDI
public void setJNDI(java.lang.String registration)
- Specified by:
setJNDI
in interface Service
getJNDI
public java.lang.String getJNDI()
- Specified by:
getJNDI
in interface Service
setName
public void setName(java.lang.String name)
- Specified by:
setName
in interface Service
getName
public java.lang.String getName()
- Specified by:
getName
in interface Service
start
public void start()
throws java.lang.Exception
- Description copied from interface:
Service
- Start the LifeCycle.
- Specified by:
start
in interface Service
- Throws:
java.lang.Exception
- An arbitrary exception may be thrown.
stop
public void stop()
throws java.lang.InterruptedException
- Description copied from interface:
Service
- Stop the LifeCycle.
The LifeCycle may wait for current activities to complete
normally, but it can be interrupted.
- Specified by:
stop
in interface Service
- Throws:
java.lang.InterruptedException
- Stopping a lifecycle is rarely atomic
and may be interrupted by another thread. If this happens
InterruptedException is throw and the component will be in an
indeterminant state and should probably be discarded.
isStarted
public boolean isStarted()
- Specified by:
isStarted
in interface Service
- Returns:
- True if the LifeCycle has been started.
Copyright ? 2000 Mortbay Consulting Pty. Ltd. All Rights Reserved.