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 TypeMethodDescriptionvoidstatic voidprotected abstract voiddoStart()protected abstract voiddoStop(ServiceStopper stopper) booleanbooleanbooleanprotected voidpostStop(ServiceStopper stopper) handle for various operations after stopping the service (like locking)protected voidpreStart()handle for various operations before starting the service (like locking)voidvoidstart()voidstop()
-
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
-