Class RecoveryGoalContext
java.lang.Object
edu.tufts.hrilab.action.execution.Context
edu.tufts.hrilab.action.execution.ArgumentBasedContext
edu.tufts.hrilab.action.execution.GoalContext
edu.tufts.hrilab.action.execution.RecoveryGoalContext
-
Field Summary
Fields inherited from class edu.tufts.hrilab.action.execution.GoalContext
executionType, goal, recoveryFields inherited from class edu.tufts.hrilab.action.execution.ArgumentBasedContext
arguments, variableFields inherited from class edu.tufts.hrilab.action.execution.Context
caller, childContexts, cmd, constraints, endTime, log, maxTime, startTime, stateMachine -
Constructor Summary
ConstructorsConstructorDescriptionRecoveryGoalContext(Context caller, StateMachine sm, ParameterizedAction recoveryAction, ExecutionType executionType, Recovery recovery) -
Method Summary
Modifier and TypeMethodDescriptionMake a copy of this node in the execution tree for simulation purposesprotected voidThis resets fields specific to concrete sub-classes and should be overridden by inheriting classes if additional resetting needs to happen.booleansetStatus(ActionStatus eStatus, Justification justification) Overriding setStatus to "catch" failures when a recovery operation should take place, and also to convert un-caught failures to FAIL_RECOVERY so the parent goal context can handle recovery failures differently from regular goal/action failures.voidIf Context can have next steps (i.e., children), implement this method to add the next child context that should be executed.Methods inherited from class edu.tufts.hrilab.action.execution.GoalContext
getGoal, getRecovery, getSignatureInPredicateForm, setupArguments, verifyEffectsMethods inherited from class edu.tufts.hrilab.action.execution.ArgumentBasedContext
addArgument, addArgument, bindPredicate, bindText, copyArguments, getArgument, getArguments, getArgumentSilent, getArgumentType, getArgumentValue, getEvaluatedArgument, getLocalArgument, hasArgumentInScope, hasLocalArgument, redistributeArguments, setArgumentMethods inherited from class edu.tufts.hrilab.action.execution.Context
addEvent, addEvent, addEvent, canCancel, canSuspend, causedFailure, copyInternal, createContext, createSimulatedEquivalent, doStep, getActor, getActualLogicalValue, getChildContexts, getCommand, getConstraints, getContextDescription, getContextDescription, getDuration, getElapsedTime, getEndTime, getEquivalentContext, getExecType, getId, getJustification, getLogicalValue, getMaxTime, getNearestTerminatedAncestor, getNextStep, getNextStepForType, getParentContext, getRootContext, getStartTime, getStateMachine, getStateUpdates, getStatus, hasNoInterruptAncestor, hasNormCheckingAncestor, isAction, isApproved, isAsynchronous, isFailure, isInterruptible, isSimulation, isSuccess, isTerminated, performAdditionalStatusUpdates, resetContext, resetCoreContext, setChildContexts, setConstraints, setEndTime, setExecType, setLogicalValue, setStartTime, setStartTime, setStateMachine, setStatus, setTimeout, setupNextStep, startOverAllMonitor, toString, updatePerformanceModels, verifyReturnValue, waitForTermination, waitForTermination
-
Constructor Details
-
RecoveryGoalContext
public RecoveryGoalContext(Context caller, StateMachine sm, ParameterizedAction recoveryAction, ExecutionType executionType, Recovery recovery)
-
-
Method Details
-
setupNextStep
public void setupNextStep()Description copied from class:ContextIf Context can have next steps (i.e., children), implement this method to add the next child context that should be executed.- Overrides:
setupNextStepin classGoalContext
-
resetConcreteContext
protected void resetConcreteContext()Description copied from class:ContextThis resets fields specific to concrete sub-classes and should be overridden by inheriting classes if additional resetting needs to happen.- Overrides:
resetConcreteContextin classGoalContext
-
setStatus
Overriding setStatus to "catch" failures when a recovery operation should take place, and also to convert un-caught failures to FAIL_RECOVERY so the parent goal context can handle recovery failures differently from regular goal/action failures. TODO: This method is synchronized to handle canceling. Is there a better way to handle this?- Overrides:
setStatusin classGoalContext- Parameters:
eStatus- the execution status of the currently running eventjustification- the reason for the context's execution status
-
getRecoveryAction
-
copy
Make a copy of this node in the execution tree for simulation purposes- Overrides:
copyin classGoalContext- Parameters:
newParent- new parent context- Returns:
-