|
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 |
java.lang.Objectorg.jboss.msc.service.AbstractServiceListener<java.lang.Object>
org.jboss.msc.service.TimingServiceListener
public final class TimingServiceListener
A service listener which times service start. The timing starts from the moment the listener is created and ends when the last service is batched and the services are all started.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.jboss.msc.service.ServiceListener |
---|
ServiceListener.Inheritance |
Constructor Summary | |
---|---|
TimingServiceListener()
Construct a new instance. |
|
TimingServiceListener(java.lang.Runnable finishedTask)
Construct a new instance which calls the given task when the timing is done. |
Method Summary | |
---|---|
void |
finishBatch()
Call when all services in this timing group have been added. |
boolean |
finished()
Determine whether all services have finished. |
long |
getElapsedTime()
Get the elapsed time in milliseconds. |
int |
getRemainingCount()
Get the number of remaining services to start. |
int |
getTotalCount()
Get the total number of services being tracked. |
void |
listenerAdded(ServiceController<? extends java.lang.Object> serviceController)
The listener has been added to a controller. |
void |
transition(ServiceController<? extends java.lang.Object> controller,
ServiceController.Transition transition)
The service has transitioned to a new sub-state. |
Methods inherited from class org.jboss.msc.service.AbstractServiceListener |
---|
dependencyFailed, dependencyFailureCleared, immediateDependencyAvailable, immediateDependencyUnavailable, serviceRemoveRequestCleared, serviceRemoveRequested, transitiveDependencyAvailable, transitiveDependencyUnavailable |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jboss.msc.service.ServiceListener |
---|
dependencyFailed, dependencyFailureCleared, immediateDependencyAvailable, immediateDependencyUnavailable, serviceRemoveRequestCleared, serviceRemoveRequested, transitiveDependencyAvailable, transitiveDependencyUnavailable |
Constructor Detail |
---|
public TimingServiceListener()
public TimingServiceListener(java.lang.Runnable finishedTask)
finishedTask
- the finish taskMethod Detail |
---|
public void listenerAdded(ServiceController<? extends java.lang.Object> serviceController)
listenerAdded
in interface ServiceListener<java.lang.Object>
listenerAdded
in class AbstractServiceListener<java.lang.Object>
serviceController
- the controller that this listener was added topublic void transition(ServiceController<? extends java.lang.Object> controller, ServiceController.Transition transition)
AbstractServiceListener
transition
in interface ServiceListener<java.lang.Object>
transition
in class AbstractServiceListener<java.lang.Object>
controller
- the controllertransition
- the transition that occurredpublic void finishBatch()
public boolean finished()
true
if all services have finishedpublic int getRemainingCount()
public int getTotalCount()
public long getElapsedTime()
|
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 |