Package org.apache.activemq.util
Class ServiceStopper
java.lang.Object
org.apache.activemq.util.ServiceStopper
A helper class used to stop a bunch of services, catching and logging any
exceptions and then throwing the first exception when everything is stoped.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
void
onException
(Object owner, Throwable e) void
Performs the given code to stop some service handling the exceptions which may be thrown properlyvoid
Stops the given service, catching any exceptions that are thrown.void
stopServices
(List services) Stops a list of servicesvoid
Throws the first exception that was thrown if there was one.
-
Constructor Details
-
ServiceStopper
public ServiceStopper()
-
-
Method Details
-
stop
Stops the given service, catching any exceptions that are thrown. -
run
Performs the given code to stop some service handling the exceptions which may be thrown properly -
stopServices
Stops a list of services -
onException
-
throwFirstException
Throws the first exception that was thrown if there was one.- Throws:
Exception
-
logError
-