Package edu.tufts.hrilab.action.recovery
Class Recovery
java.lang.Object
edu.tufts.hrilab.action.recovery.Recovery
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal JustificationGet the Justification of the failure which originally caused recovery to begin.final ActionStatusGet the ActionStatus of the failure which originally caused recovery to begin.Get the current PostRecoveryExecutionTypegetSelectedRecoveryPolicy(Context context) final RecoveryStatusGet current recovery status/mode.voidvoidResets recovery state - clears cached details from last failure and chosen recovery policy to allow for new recoveriesselectNextAction(Goal goal, ActionConstraints constraints, StateMachine stateMachine) booleanshouldAttemptRecovery(ActionStatus actionStatus, Justification justification, Context context) voidCalled when this Recovery's corresponding ActionContext calls setupNextStep from its parservoidupdateRecoveryStatus(Context context)
-
Field Details
-
log
protected org.slf4j.Logger log -
recoveryStatus
-
-
Constructor Details
-
Recovery
public Recovery()
-
-
Method Details
-
getStatus
Get current recovery status/mode.- Returns:
-
getOriginalFailureStatus
Get the ActionStatus of the failure which originally caused recovery to begin.- Returns:
- the ActionStatus, null if not currently in recovery
-
getOriginalFailureJustification
Get the Justification of the failure which originally caused recovery to begin.- Returns:
- the Justification, null if not currently in recovery
-
getPostRecoveryExecutionType
Get the current PostRecoveryExecutionType -
resetState
public void resetState()Resets recovery state - clears cached details from last failure and chosen recovery policy to allow for new recoveries -
resetConcreteState
public void resetConcreteState() -
shouldAttemptRecovery
public boolean shouldAttemptRecovery(ActionStatus actionStatus, Justification justification, Context context) -
selectNextAction
public ParameterizedAction selectNextAction(Goal goal, ActionConstraints constraints, StateMachine stateMachine) -
getSelectedRecoveryPolicy
-
updateRecoveryStatus
-
getContextToRetry
-
signalStep
public void signalStep()Called when this Recovery's corresponding ActionContext calls setupNextStep from its parser
-