org.mortbay.jetty.plus

Class AbstractService

Implemented Interfaces:
LifeCycle, Service
Known Direct Subclasses:
AbstractDataSourceService, MailService, TMService

public abstract class AbstractService
extends java.lang.Object
implements Service

Field Summary

protected String
_jndi
protected String
_name
protected boolean
_started

Method Summary

String
getJNDI()
String
getName()
boolean
isStarted()
void
setJNDI(String registration)
void
setName(String name)
void
start()
Start the LifeCycle.
void
stop()
Stop the LifeCycle.

Field Details

_jndi

protected String _jndi

_name

protected String _name

_started

protected boolean _started

Method Details

getJNDI

public String getJNDI()
Specified by:
getJNDI in interface Service

getName

public String getName()
Specified by:
getName in interface Service

isStarted

public boolean isStarted()
Specified by:
isStarted in interface Service
isStarted in interface LifeCycle
Returns:
True if the LifeCycle has been started.

setJNDI

public void setJNDI(String registration)
Specified by:
setJNDI in interface Service

setName

public void setName(String name)
Specified by:
setName in interface Service

start

public void start()
            throws Exception
Start the LifeCycle.
Specified by:
start in interface Service
start in interface LifeCycle

stop

public void stop()
            throws InterruptedException
Stop the LifeCycle. The LifeCycle may wait for current activities to complete normally, but it can be interrupted.
Specified by:
stop in interface Service
stop in interface LifeCycle

Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.