Package org.jboss.msc.service
Class ServiceUtils
- java.lang.Object
-
- org.jboss.msc.service.ServiceUtils
-
public final class ServiceUtils extends java.lang.ObjectA utility class for service actions.
-
-
Constructor Summary
Constructors Modifier Constructor Description privateServiceUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisServiceThread(java.lang.Thread thread)Determine whether the given thread is a service thread.static booleanisServiceThread(java.lang.Thread thread, ServiceContainer container)Determine whether the given thread is a service thread which is associated with the given container.static voidundeployAll(java.lang.Runnable completeTask, java.util.List<ServiceController<?>> controllers)Undeploy all the controllers and call the given runnable task when complete.static voidundeployAll(java.lang.Runnable completeTask, ServiceController<?>... controllers)Undeploy all the controllers and call the given runnable task when complete.
-
-
-
Method Detail
-
undeployAll
public static void undeployAll(java.lang.Runnable completeTask, ServiceController<?>... controllers)Undeploy all the controllers and call the given runnable task when complete.- Parameters:
completeTask- the complete taskcontrollers- the controllers to undeploy
-
undeployAll
public static void undeployAll(java.lang.Runnable completeTask, java.util.List<ServiceController<?>> controllers)Undeploy all the controllers and call the given runnable task when complete. The given controllers list should not be modified while this method runs, or the results will be undefined.- Parameters:
completeTask- the complete taskcontrollers- the controllers to undeploy
-
isServiceThread
public static boolean isServiceThread(java.lang.Thread thread)
Determine whether the given thread is a service thread.- Parameters:
thread- the thread to test- Returns:
trueif it is a service thread,falseotherwise
-
isServiceThread
public static boolean isServiceThread(java.lang.Thread thread, ServiceContainer container)Determine whether the given thread is a service thread which is associated with the given container.- Parameters:
thread- the thread to testcontainer- the container to compare to- Returns:
trueif it is a service thread,falseotherwise
-
-