Class RecoveryGoalContext


public class RecoveryGoalContext extends GoalContext
  • Constructor Details

  • Method Details

    • doStep

      public void doStep()
      Description copied from class: Context
      If Context has a concrete execution step to perform, it should happen in this method. This should not include setting up next steps (i.e., children to perform), which should happen in the setupNextStep method. Primitive actions and operators (i.e., leaf nodes in the context tree) are examples where this method should be implemented.
      Overrides:
      doStep in class Context
    • resetConcreteContext

      protected 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 class GoalContext
    • setStatus

      public void setStatus(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. TODO: This method is synchronized to handle canceling. Is there a better way to handle this?
      Overrides:
      setStatus in class GoalContext
      Parameters:
      eStatus - the execution status of the currently running event
      justification - the reason for the context's execution status
    • copy

      public RecoveryGoalContext copy(Context newParent)
      Make a copy of this node in the execution tree for simulation purposes
      Overrides:
      copy in class GoalContext
      Parameters:
      newParent - new parent context
      Returns: