ControllerContext
- org.jboss.dependency.spi.ControllerContext
The controller context manages the state, dependencies and transistions of the underlying target. It is a generic context that can deal with many different models.
Implementations
AbstractControllerContext - the base implementation
KernelControllerContext - the pojo model
ServiceControllerContext the jmx model
Attributes
Object getName()
- the name of the context.
Object getTarget()
- the underlying target of this context.
DependencyInfo getDependencyInfo()
- the dependencies of the context.
Controller getController()
- the controller this context is installed in (1).
ControllerState getState()
- the current state of the context.
ControllerState getRequiredState()
- the requested state of the context (2).
ControllerMode getMode()
- the mode of the context.
Throwable getError()
- the underlying exception that caused the context to move to the Error state.
Operations
install(ControllerState fromState, ControllerState toState
- performs the operation necessary to install the context between the fromState and the toState (3).
uninstall(ControllerState fromState, ControllerState toState
- performs the operation necessary to uninstall the context between the fromState and the toState (3).
Notes:
(1) This will be null when the context is not installed in a controller.
(2) Controlled by Controller.change()
(3) Currently, the state model is linear and multiple invocations of these methods are invoked to move the context through the states. This actually makes the fromState redundant at the moment since it is always the current state.
Referenced by:
Comments