@Contract public interface RunLevelController
Each run level service is responsible for a particular class of
RunLevel that is identified by a RunLevelControllerIndicator
value.
Implementations of this service are responsible for orchestrating
lifecycle events for services annotated with RunLevel.
| Modifier and Type | Method and Description |
|---|---|
java.lang.Integer |
getCurrentRunLevel()
The current run level state.
|
java.lang.Integer |
getPlannedRunLevel()
The planned run level state.
|
void |
interrupt()
Causes this RunLevelController to attempt to stop any in-flight
proceedTo() operation.
|
void |
proceedTo(int runLevel)
Causes this RunLevelController to move to the specified run level for
all
RunLevel instances (identified by
RunLevelControllerIndicator), orchestrating the appropriate
lifecycle events. |
void |
recordActivation(ActiveDescriptor<?> descriptor)
Record the activation the run level service associated with the given
descriptor.
|
void proceedTo(int runLevel)
RunLevel instances (identified by
RunLevelControllerIndicator), orchestrating the appropriate
lifecycle events.
If the run level specified is the same as the current run level then the RunLevelController may return immediately.
Note that the underlying implementation may perform this operation asynchronously. Implementors who choose the asynchronous approach are expected to treat a subsequent proceedTo(newRunLevel) call as an implicit cancellation of any currently running proceedTo() that is running on one or more managed threads.
This method will use the default activator which either starts or stops the services depending on whether or not the runLevel is coming up or going down
runLevel - the run level to move tovoid interrupt()
java.lang.Integer getCurrentRunLevel()
java.lang.Integer getPlannedRunLevel()
void recordActivation(ActiveDescriptor<?> descriptor)
descriptor - the descriptorCopyright © 2013 Oracle Corporation. All Rights Reserved.