public interface ServiceContainer extends ServiceTarget, ServiceRegistry
| Modifier and Type | Interface and Description | 
|---|---|
| static class  | ServiceContainer.FactoryThe factory class for service containers. | 
| static interface  | ServiceContainer.TerminateListenerA listener for notification of container shutdown. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addTerminateListener(ServiceContainer.TerminateListener listener)Add a terminate listener to this container. | 
| void | awaitStability()Causes the current thread to wait until the container is stable. | 
| boolean | awaitStability(long timeout,
              TimeUnit unit)Causes the current thread to wait until the container is stable. | 
| boolean | awaitStability(long timeout,
              TimeUnit unit,
              Set<? super ServiceController<?>> failed,
              Set<? super ServiceController<?>> problem)Causes the current thread to wait until the container is stable. | 
| void | awaitStability(Set<? super ServiceController<?>> failed,
              Set<? super ServiceController<?>> problem)Causes the current thread to wait until the container is stable. | 
| void | awaitTermination()Causes the current thread to wait until the container is shutdown. | 
| void | awaitTermination(long timeout,
                TimeUnit unit)Causes the current thread to wait until the container is shutdown. | 
| void | dumpServices()Dump a complete list of services to  System.out. | 
| void | dumpServices(PrintStream stream)Dump a complete list of services to the given stream. | 
| String | getName()Get the name of this service container. | 
| boolean | isShutdown()Whether container have been shut down. | 
| boolean | isShutdownComplete()Determine whether the container is completely shut down. | 
| void | shutdown()Stop all services within this container. | 
addDependency, addDependency, addDependency, addListener, addListener, addListener, addMonitor, addMonitors, addService, addServiceValue, batchTarget, getDependencies, getListeners, getMonitors, removeDependency, removeListener, removeMonitor, subTargetgetRequiredService, getService, getServiceNamesvoid shutdown()
boolean isShutdown()
true if container is shutting downboolean isShutdownComplete()
true if shutdown is completevoid addTerminateListener(ServiceContainer.TerminateListener listener)
listener will be invoked when this container shutdown process is complete.listener - the listenervoid awaitTermination()
               throws InterruptedException
InterruptedException - if the current thread is interrupted
         while waitingvoid awaitTermination(long timeout,
                      TimeUnit unit)
               throws InterruptedException
timeout - the maximum time to waitunit - the time unit of the timeout argumentInterruptedException - if the current thread is interrupted
         while waitingvoid awaitStability()
             throws InterruptedException
InterruptedException - if the current thread is interrupted
         while waitingboolean awaitStability(long timeout,
                       TimeUnit unit)
                throws InterruptedException
timeout - the maximum time to waitunit - the time unit of the timeout argumentInterruptedException - if the current thread is interrupted
         while waitingvoid awaitStability(Set<? super ServiceController<?>> failed, Set<? super ServiceController<?>> problem) throws InterruptedException
failed - a set into which failed services should be copiedproblem - a set into which problem services should be copiedInterruptedException - if the current thread is interrupted
         while waitingboolean awaitStability(long timeout,
                       TimeUnit unit,
                       Set<? super ServiceController<?>> failed,
                       Set<? super ServiceController<?>> problem)
                throws InterruptedException
timeout - the maximum time to waitunit - the time unit of the timeout argumentfailed - a set into which failed services should be copiedproblem - a set into which problem services should be copiedInterruptedException - if the current thread is interrupted
         while waitingvoid dumpServices()
System.out.void dumpServices(PrintStream stream)
stream - the stream to which the service list should be writtenString getName()
Copyright © 2017 JBoss by Red Hat. All rights reserved.