Public Member Functions | |
void | initialize (ContainerServices containerServices) throws ComponentLifecycleException |
void | cleanUp () |
final ROstringSeq | currentStateHierarchy () |
final synchronized void | doTransition (SubsystemStateEvent event) throws IllegalStateEventEx |
void | stateChangedNotify (AcsState[] oldStateHierarchy, AcsState[] currentStateHierarchy) |
void | updateStateHierarchy () throws AcsJException |
Protected Member Functions | |
abstract AlmaSubsystemActions | getActionHandler () |
final void | monitorComponent (ACSComponent component) |
final< T extends ACSComponent > void | monitorComponent (T component, SubsysResourceMonitor.ResourceErrorHandler< T > err) |
final void | monitorPingableResource (PingableResourceOperations resource, String name) |
final< T extends PingableResourceOperations > void | monitorPingableResource (T resource, String name, SubsysResourceMonitor.ResourceErrorHandler< T > err) |
final< T > void | monitorResource (SubsysResourceMonitor.ResourceChecker< T > checker, SubsysResourceMonitor.ResourceErrorHandler< T > err, int monitorDelaySeconds) |
final void | stopMonitoringResource (String resourceName) |
final void | stopMonitoringAllResources () |
Static Package Functions | |
String | event2Name (SubsystemStateEvent event) |
Private Attributes | |
ROstringSeq | m_currentStateHierarchy |
DataAccess | m_currentStateHierarchyDataAccess |
AlmaSubsystemContext | m_stateMachine |
SubsysResourceMonitor | subsysComponentMonitor |
StateChangeNotificationChecker | stateChangeNotificationChecker |
Each ALMA subsystem ('subsystem' in its technical meaning) must provide such a master component for administrational purposes. It's strongly recommended to do this in Java and use MasterComponentImplBase
as the base class for the component implementation.
This class provides the transition logic for the various states. Subclasses only need to implement the actions for the various transitions or, more accurately, for the activity states. (see method getActionHandler; as an example, please see TestMasterComponent.
|
Master component subclasses must call |
|
Implements alma::ACS::MasterComponentReadOnlyOperations.
|
|
Dispatches the event to the corresponding state machine method. Relies on CORBA to queue concurrent calls, which this synchronized implementation forcefully serializes. Note that calls should always return quickly, since the real work is done asynchronously in activity states.
|
|
Returns an "inofficial" string version of a
|
|
Subsystem state machine actions, to be implemented by concrete subclasses. Implemented in alma::ACS::MasterComponentImpl::TestMasterComponentImpl.
|
|
Master component subclasses must call |
|
Subclasses can request to have the "health" of a given subsystem component monitored, and that the provided
Unlike method monitorComponent(ACSComponent), this method gives full control over the reaction to a detected failure. The master component can thus ignore or try to fix the problem, or eventually also go to error state (by calling Before a resource gets unloaded/released etc, its monitoring should be stopped to avoid false errors, using stopMonitoringResource(String) or stopMonitoringAllResources().
|
|
Subclasses can request to have the "health" of a given subsystem component monitored, and that the mastercomponent state be set to "Error" in case problems are detected with this component. It is then the responsibility of the operator or some other external actor to get the mastercomponent out of this error state again. In other words, this method helps to detect problems, but does not fix the problem itself. Detected problems can be
Note that this is a simplified version of monitorComponent(ACSComponent, ComponentErrorHandler) and does not require the subclass to provide an error handler. Before a resource gets unloaded/released etc, its monitoring should be stopped to avoid false errors, using stopMonitoringResource(String) or stopMonitoringAllResources().
|
|
Like monitorComponent() but for objects implementing the PingableResource interface.
|
|
Like monitorComponent(ACSComponent) but for objects implementing the PingableResource interface.
|
|
Subclasses can request to have the "health" of a given subsystem component monitored, and that the provided
Compared with the methods that allow monitoring a component, this method offers more flexibility: any kind of resource can be monitored, for which a custom This method also takes the delay between monitor calls as a parameter, to allow adjusting the frequency of monitor calls on a per resource basis. Invalid values will result in the default delay being used. Before a resource gets unloaded/released etc, its monitoring should be stopped to avoid false errors, using stopMonitoringResource(String) or stopMonitoringAllResources().
|
|
Will be called by the state machine implementation for every state change. Normally you should not overload this method; if you do, make sure to call updateStateHierarchy() so that the state change propagates to the field which is visible from the outside of this component.
|
|
Stops monitoring all resources that have been previously submitted for monitoring.
|
|
Stops monitoring a resource. It is important to stop monitoring resources before they get released, for example when shutting down.
|
|
Sets the property value of This method should not be overloaded by subclasses! We just don't make it final to meet special testing needs. |
|
all nested states contained in one property for atomic access, listed from top-level state down to substates. |
|
|
|
|
|
|
|
|