@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.
|
Activator |
getDefaultActivator()
Returns the default activator which can be used to properly activate
and deactivate run-level services
|
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 |
proceedTo(int runLevel,
Activator activator)
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,
Activator activator)
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.
runLevel - the run level to move toactivator - The activator to use for this processionvoid 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 descriptorActivator getDefaultActivator()
Copyright © 2013 Oracle Corporation. All Rights Reserved.