public final class TimingServiceListener extends AbstractServiceListener<Object> implements ServiceListener<Object>
ServiceListener.Inheritance
Constructor and Description |
---|
TimingServiceListener()
Construct a new instance.
|
TimingServiceListener(Runnable finishedTask)
Construct a new instance which calls the given task when the timing is done.
|
Modifier and Type | Method and Description |
---|---|
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 Object> serviceController)
The listener has been added to a controller.
|
void |
transition(ServiceController<? extends Object> controller,
ServiceController.Transition transition)
The service has transitioned to a new sub-state.
|
dependencyFailed, dependencyFailureCleared, immediateDependencyAvailable, immediateDependencyUnavailable, serviceRemoveRequestCleared, serviceRemoveRequested, transitiveDependencyAvailable, transitiveDependencyUnavailable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dependencyFailed, dependencyFailureCleared, immediateDependencyAvailable, immediateDependencyUnavailable, serviceRemoveRequestCleared, serviceRemoveRequested, transitiveDependencyAvailable, transitiveDependencyUnavailable
public TimingServiceListener()
public TimingServiceListener(Runnable finishedTask)
finishedTask
- the finish taskpublic void listenerAdded(ServiceController<? extends Object> serviceController)
listenerAdded
in interface ServiceListener<Object>
listenerAdded
in class AbstractServiceListener<Object>
serviceController
- the controller that this listener was added topublic void transition(ServiceController<? extends Object> controller, ServiceController.Transition transition)
AbstractServiceListener
transition
in interface ServiceListener<Object>
transition
in class AbstractServiceListener<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()
Copyright © 2018 JBoss by Red Hat. All rights reserved.