Class CatchContext
java.lang.Object
edu.tufts.hrilab.action.execution.Context
edu.tufts.hrilab.action.execution.ArgumentBasedContext
edu.tufts.hrilab.action.execution.control.CatchContext
-
Field Summary
Fields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeep copy of the context, its status, and its childrenGet ActionStatus that this CatchContext is capable of catching.protected voidsetupArguments(List<? extends Object> inputArgs, List<? extends Object> returnArgs) Sets up the arguments for the catch context.protected voidIf Context can have next steps (i.e., children), implement this method to add the next child context that should be executed.protected voidtransmitErrorInfo(Justification details) Transmits error information to the catch context.Methods inherited from class edu.tufts.hrilab.action.execution.ArgumentBasedContext
addArgument, addArgument, bindPredicate, bindText, copyArguments, getArgument, getArguments, getArgumentSilent, getArgumentType, getArgumentValue, getEvaluatedArgument, getLocalArgument, getSignatureInPredicateForm, hasArgumentInScope, hasLocalArgument, redistributeArguments, setArgumentMethods inherited from class edu.tufts.hrilab.action.execution.Context
acquireLocks, addEvent, addEvent, addEvent, causedFailure, copyInternal, 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, hasNormCheckingAncestor, isAction, isApproved, isAsynchronous, isFailure, isSimulation, isSuccess, isTerminated, performAdditionalStatusUpdates, releaseLocks, resetConcreteContext, resetContext, resetCoreContext, setChildContexts, setConstraints, setEndTime, setExecType, setLogicalValue, setStartTime, setStartTime, setStateMachine, setStatus, setStatus, setTimeout, setupNextStep, startOverAllMonitor, toString, updatePerformanceModels, verifyEffects, verifyReturnValue, waitForTermination, waitForTermination
-
Constructor Details
-
CatchContext
-
-
Method Details
-
transmitErrorInfo
Transmits error information to the catch context. To add support for a new failure state, add an new case in the switch statement, changing the type cast to the appropriate type for the error status. See setupArguments().- Parameters:
details- details about the error
-
setupArguments
Sets up the arguments for the catch context. To add support for a new failure state, add a new case in the switch statement, creating an ActionBinding for the appropriate type (error message type). See transmitErrorInfo().- Specified by:
setupArgumentsin classArgumentBasedContext- Parameters:
inputArgs-returnArgs-
-
setupNextStep
protected 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 classContext
-
getStatusToCatch
Get ActionStatus that this CatchContext is capable of catching.- Returns:
-
copy
Description copied from class:Contextdeep copy of the context, its status, and its children
-