|
JBoss Modular Service Kernel API 1.0.0.CR2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ServiceContainer

A service container which manages a set of running services.
| Nested Class Summary | |
|---|---|
static class |
ServiceContainer.Factory
The factory class for service containers. |
static interface |
ServiceContainer.TerminateListener
A listener for notification of container shutdown. |
| Method Summary | |
|---|---|
void |
addTerminateListener(ServiceContainer.TerminateListener listener)
Add a terminate listener to this container. |
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 |
isShutdownComplete()
Determine whether the container is completely shut down. |
void |
shutdown()
Stop all services within this container. |
| Methods inherited from interface org.jboss.msc.service.ServiceTarget |
|---|
addDependency, addDependency, addDependency, addListener, addListener, addListener, addListener, addListener, addListener, addService, addServiceValue, batchTarget, getDependencies, getListeners, removeDependency, removeListener, subTarget |
| Methods inherited from interface org.jboss.msc.service.ServiceRegistry |
|---|
getRequiredService, getService, getServiceNames |
| Method Detail |
|---|
void shutdown()
boolean isShutdownComplete()
true if shutdown is completevoid addTerminateListener(ServiceContainer.TerminateListener listener)
listener will be invoked when this container shutdown process is complete.
listener - the listener
void awaitTermination()
throws InterruptedException
InterruptedException - if the current thread is interrupted
while waiting
void awaitTermination(long timeout,
TimeUnit unit)
throws InterruptedException
timeout - the maximum time to waitunit - the time unit of the timeout argument
InterruptedException - 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()
|
JBoss Modular Service Kernel API 1.0.0.CR2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||