|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.camel.impl.ServiceSupport
public abstract class ServiceSupport
A useful base class which ensures that a service is only initialized once and provides some helper methods for enquiring of its status
Constructor Summary | |
---|---|
ServiceSupport()
|
Method Summary | |
---|---|
protected void |
addChildService(Object childService)
|
protected abstract void |
doStart()
|
protected abstract void |
doStop()
|
ServiceStatus |
getStatus()
Returns the current status |
String |
getVersion()
Returns the version of this service |
protected boolean |
isRunAllowed()
Helper methods so the service knows if it should keep running. |
boolean |
isStarted()
|
boolean |
isStarting()
|
boolean |
isStopped()
|
boolean |
isStopping()
|
protected boolean |
removeChildService(Object childService)
|
void |
start()
Starts the service |
void |
stop()
Stops the service |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServiceSupport()
Method Detail |
---|
public void start() throws Exception
Service
start
in interface Service
Exception
public void stop() throws Exception
Service
stop
in interface Service
Exception
public ServiceStatus getStatus()
public boolean isStarted()
public boolean isStarting()
public boolean isStopping()
public boolean isStopped()
protected boolean isRunAllowed()
protected abstract void doStart() throws Exception
Exception
protected abstract void doStop() throws Exception
Exception
protected void addChildService(Object childService)
protected boolean removeChildService(Object childService)
public String getVersion()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |