Class ConsequenceAction

All Implemented Interfaces:
Cloneable

public class ConsequenceAction extends Action
A ConsequenceAction represents an action that a test may execute when it undergoes a F->T or T->T state transition.
  • Field Details

    • CNAME

      public static String CNAME
  • Constructor Details

    • ConsequenceAction

      public ConsequenceAction(String microAgentName, COM.TIBCO.hawk.talon.MethodInvocation mi) throws IllegalArgumentException
      Constructs a ConsequenceAction with default values for the perform action policy (PerformOnceOnly) and escalation period (0).
      Parameters:
      microAgentName - microagent name for this action, must not be null or empty string
      mi - method invocation for this action
      Throws:
      IllegalArgumentException - if microagent name is null or empty string
      IllegalArgumentException - if method invocation is null
  • Method Details

    • getEscalationTime

      public int getEscalationTime()
      Returns the escalation time of this action.
    • setEscalationTime

      public void setEscalationTime(int sec)
      Sets the escalation time of this action.
      Parameters:
      sec - the escalation time in seconds.
      Throws:
      IllegalArgumentException - if time is negative.
    • setPerformActionPolicy

      public void setPerformActionPolicy(PerformActionPolicy policy)
      Sets the perform action policy. The only supported perform action policy types are PerformOnceOnly, PerformAlways, and PerformCountOnInterval.
      Throws:
      IllegalArgumentException - of the perform action policy is not one of the supported policies.
    • getPerformActionPolicy

      public PerformActionPolicy getPerformActionPolicy()
      Returns the perform action policy.
    • toString

      public String toString()
      Returns string representation of this action.
      Overrides:
      toString in class Action
    • equals

      public boolean equals(Object obj)
      Compares two ConsequenceActions for equality.
      Overrides:
      equals in class Action
    • clone

      public Object clone()
      Returns a copy of this object
      Specified by:
      clone in class RulebaseElement
    • toXML

      protected void toXML(COM.TIBCO.hawk.util.xml.XmlWriter out) throws IOException, RulebaseException
      Write XML representation of the action to the XML writer.
      Overrides:
      toXML in class Action
      Parameters:
      out - the XML writer where the output will be written.
      Throws:
      IOException
      RulebaseException
      See Also:
      • XmlWriter
    • fromXML

      protected void fromXML(COM.TIBCO.hawk.util.xml.XmlElementNode node) throws RulebaseException
      Read XML representation of the action from the XML node.
      Overrides:
      fromXML in class Action
      Parameters:
      node - the XML node containing the action.
      Throws:
      RulebaseException
      See Also:
      • XmlElementNode