Package org.apache.activemq.util
Class ServiceSupport
java.lang.Object
org.apache.activemq.util.ServiceSupport
- All Implemented Interfaces:
Service
- Direct Known Subclasses:
Scheduler
,TransportServerSupport
,TransportSupport
A helper class for working with services together with a useful base class
for service implementations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
static void
protected abstract void
doStart()
protected abstract void
doStop
(ServiceStopper stopper) boolean
boolean
boolean
protected void
postStop
(ServiceStopper stopper) handle for various operations after stopping the service (like locking)protected void
preStart()
handle for various operations before starting the service (like locking)void
void
start()
void
stop()
-
Constructor Details
-
ServiceSupport
public ServiceSupport()
-
-
Method Details
-
dispose
-
start
-
stop
-
isStarted
public boolean isStarted()- Returns:
- true if this service has been started
-
isStopping
public boolean isStopping()- Returns:
- true if this service is in the process of closing
-
isStopped
public boolean isStopped()- Returns:
- true if this service is closed
-
addServiceListener
-
removeServiceListener
-
postStop
handle for various operations after stopping the service (like locking)- Throws:
Exception
-
doStop
- Throws:
Exception
-
preStart
handle for various operations before starting the service (like locking)- Throws:
Exception
-
doStart
- Throws:
Exception
-