|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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()
|
protected String |
getThreadName(String prefix)
Creates a new thread name with the given prefix |
protected boolean |
isRunAllowed()
Helper methods so the service knows if it should keep running. |
boolean |
isStarted()
|
boolean |
isStarting()
|
boolean |
isStopped()
|
boolean |
isStopping()
|
protected static int |
nextThreadCounter()
|
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 boolean isStarted()
public boolean isStarting()
public boolean isStopping()
protected boolean isRunAllowed()
public boolean isStopped()
protected abstract void doStart() throws Exception
Exception
protected abstract void doStop() throws Exception
Exception
protected String getThreadName(String prefix)
protected static int nextThreadCounter()
protected void addChildService(Object childService)
protected boolean removeChildService(Object childService)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |