Class RecoveryGoalContext


public class RecoveryGoalContext extends GoalContext
  • Constructor Details

  • Method Details

    • setupNextStep

      public 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 class GoalContext
    • 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 boolean 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
    • getRecoveryAction

      public ParameterizedAction getRecoveryAction()
    • 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: