Real-Time Java AOCS Framework v1.0 API Specification

RtjAocsFramework.FailureRecovery
Class RecoveryAction

java.lang.Object
  |
  +--RtjAocsFramework.BasicObjects.RootObject
        |
        +--RtjAocsFramework.BasicObjects.AocsObject
              |
              +--RtjAocsFramework.FailureRecovery.RecoveryAction
All Implemented Interfaces:
Configurable, Resettable, Telemeterable
Direct Known Subclasses:
ModeChange, NullRecoveryAction, ObjectReset, Reconfiguration, SystemReset

public class RecoveryAction
extends AocsObject

This is the base class for recovery actions. In general, the AOCS software can react to a failure report (as encapsulated in a failure event) by performing one or more failure recovery actions. A failure recovery actions therefore represents a local response to a failure. The response is said to be local because it is based on a single failure report. A global response would take account of sets of failure reports. Global responses to failures are covered by the concept of recovery strategy.

This class is the base class for all recovery actions. By itself, it does not define any concrete action. Concrete recovery actions are defined by subclasses of RecoveryAction.

The key method in this class is doRecovery that causes the recovery action to be performed. The implementation of method doRecovery encapsulates an application-specific response to failures. It therefore represents a framework hot-spot (recovery action hot-spot).

The same failure event may require the execution of several failure recovery actions. For this purpose, recovery actions can be chained together. Method setNextAction() can be used to build up a chain of recovery actions. Calls to doRecovery() are automatically propagated to all recovery action in a chain.

Recovery actions can be enabled or disabled and the enable status can be changed dynamically.

Copyright: see the Copyright Notice.

Version:
1.0
Author:
Alessandro Pasetti (University of Konstanz)
See Also:
The Failure Recovery Framelet Document., FailureEvent, FailureEventRepository, RecoveryStrategy

Field Summary
 
Fields inherited from interface RtjAocsFramework.TelemetryManagement.Telemeterable
DEBUG_TM, LONG_TM, NORMAL_TM, NTMFORMATS, SHORT_TM
 
Constructor Summary
RecoveryAction()
           
 
Method Summary
 void doRecovery()
          Calling this method will cause the recovery action to be executed.
 RecoveryAction getNextRecoveryAction()
          Return the next recovery action.
 int getTelemetryImageLength()
          Return the length (in bits) of the telemetry image of the object.
 boolean isEnabled()
          Return true if the recovery action is enabled, otherwise false.
 void reset()
          Set the state of the recovery action to 'enabled'.
 void resetConfiguration()
          Unload the next recovery action in the chain.
 void setEnabled(boolean enabledStatus)
          Recovery actions can be dynamically enabled and disabled.
 void setNextRecoveryAction(RecoveryAction r)
          Recovery actions can be linked in chains.
 void writeToTelemetry(TelemetryStream tmStream)
          Direct the object to write its own state to the telemetry stream.
 
Methods inherited from class RtjAocsFramework.BasicObjects.AocsObject
addConfigurationListener, addFailureListener, finalize, getAocsClock, getConfigurationListenerList, getCycle, getDestructionRecoveryAction, getFailureListenerList, getSystemManager, getTelemetryFormat, getTime, isConfigured, removeConfigurationListener, removeFailureListener, reportConfigurationEvent, reportFailure, resetStaticConfiguration, setAocsClock, setDestructionRecoveryAction, setMaxNumberOfConfigurationListeners, setMaxNumberOfFailureListeners, setSystemManager, setTelemetryFormat
 
Methods inherited from class RtjAocsFramework.BasicObjects.RootObject
getClassId, getInstanceId, setClassId
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecoveryAction

public RecoveryAction()
Method Detail

doRecovery

public void doRecovery()
Calling this method will cause the recovery action to be executed. Conceptually, this should be an abstract method. Its implementation in the base class for all recovery action simply performs the forwarding of the doRecovery() call to the next recovery action in the chain of linked recovery actions.


resetConfiguration

public void resetConfiguration()
Unload the next recovery action in the chain.

Specified by:
resetConfiguration in interface Configurable
Overrides:
resetConfiguration in class AocsObject

reset

public void reset()
Set the state of the recovery action to 'enabled'.

Specified by:
reset in interface Resettable
Overrides:
reset in class AocsObject

setNextRecoveryAction

public void setNextRecoveryAction(RecoveryAction r)
Recovery actions can be linked in chains. After a recovery action has executed its own action, it calls the next recovery action in the chain.


getNextRecoveryAction

public RecoveryAction getNextRecoveryAction()
Return the next recovery action.


setEnabled

public void setEnabled(boolean enabledStatus)
Recovery actions can be dynamically enabled and disabled. When doRecovery() is called on an action that is disabled, no action is taken (but the call is still passed to the next recovery action in the chain). By default, at creation, recovery actions are enabled.


isEnabled

public boolean isEnabled()
Return true if the recovery action is enabled, otherwise false.


writeToTelemetry

public void writeToTelemetry(TelemetryStream tmStream)
Description copied from interface: Telemeterable
Direct the object to write its own state to the telemetry stream.

Specified by:
writeToTelemetry in interface Telemeterable
Overrides:
writeToTelemetry in class AocsObject

getTelemetryImageLength

public int getTelemetryImageLength()
Description copied from interface: Telemeterable
Return the length (in bits) of the telemetry image of the object. This method is useful to verify that the quantity of data generated by a given object is compatible with the capacity of the telemetry channel.

Specified by:
getTelemetryImageLength in interface Telemeterable
Overrides:
getTelemetryImageLength in class AocsObject

Real-Time Java AOCS Framework v1.0 API Specification

Real-Time Java AOCS Framework project home page

Automatic Control Laboratory, ETH Zuerich
Physikstrasse 3
CH-8092 Zuerich, Switzerland