Class TryContext
java.lang.Object
edu.tufts.hrilab.action.execution.Context
edu.tufts.hrilab.action.execution.control.TryContext
This represents the semantics of the TRY control in an action script.
-
Field Summary
Fields 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 childrenvoid
This resets fields specific to concrete sub-classes and should be overridden by inheriting classes if additional resetting needs to happen.void
setStatus
(ActionStatus eStatus, Justification justification) Exit the current event.protected void
If 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.Context
acquireLocks, addEvent, addEvent, addEvent, causedFailure, copyInternal, createSimulatedEquivalent, doStep, getActor, getActualLogicalValue, getArgument, getArguments, getArgumentSilent, getArgumentType, getArgumentValue, getChildContexts, getCommand, getConstraints, getContextDescription, getContextDescription, getDuration, getElapsedTime, getEndTime, getEquivalentContext, getEvaluatedArgument, getExecType, getId, getJustification, getLocalArgument, getLogicalValue, getMaxTime, getNearestTerminatedAncestor, getNextStep, getNextStepForType, getParentContext, getRootContext, getSignatureInPredicateForm, getStartTime, getStateMachine, getStateUpdates, getStatus, hasNormCheckingAncestor, isAction, isApproved, isAsynchronous, isFailure, isSimulation, isSuccess, isTerminated, performAdditionalStatusUpdates, releaseLocks, resetContext, resetCoreContext, setChildContexts, setConstraints, setEndTime, setExecType, setLogicalValue, setStartTime, setStartTime, setStateMachine, setStatus, setTimeout, setupNextStep, startOverAllMonitor, toString, updatePerformanceModels, verifyEffects, verifyReturnValue, waitForTermination, waitForTermination
-
Constructor Details
-
TryContext
Constructor.- Parameters:
c
-
-
-
Method Details
-
resetConcreteContext
public void resetConcreteContext()Description copied from class:Context
This resets fields specific to concrete sub-classes and should be overridden by inheriting classes if additional resetting needs to happen.- Overrides:
resetConcreteContext
in classContext
-
setStatus
Exit the current event. Note that this is always called from the child event, setting its execution status before it returns.Special handling of error in try context: do not transmit error to parent context, instead handle the error within the context by jumping to the catch block. If an exit happens in the catch block, resume standard behavior by transmitting error to parent context.
-
setupNextStep
protected void setupNextStep()Description copied from class:Context
If Context can have next steps (i.e., children), implement this method to add the next child context that should be executed.- Overrides:
setupNextStep
in classContext
-
copy
Description copied from class:Context
deep copy of the context, its status, and its children
-