Class ConsequenceAction
java.lang.Object
COM.TIBCO.hawk.config.rbengine.rulebase.RulebaseElement
COM.TIBCO.hawk.config.rbengine.rulebase.Action
COM.TIBCO.hawk.config.rbengine.rulebase.ConsequenceAction
- All Implemented Interfaces:
Cloneable
A ConsequenceAction represents an action that a test may execute when
it undergoes a F->T or T->T state transition.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConsequenceAction(String microAgentName, COM.TIBCO.hawk.talon.MethodInvocation mi) Constructs a ConsequenceAction with default values for the perform action policy (PerformOnceOnly) and escalation period (0). -
Method Summary
Modifier and TypeMethodDescriptionclone()Returns a copy of this objectbooleanCompares two ConsequenceActions for equality.protected voidfromXML(COM.TIBCO.hawk.util.xml.XmlElementNode node) Read XML representation of the action from the XML node.intReturns the escalation time of this action.Returns the perform action policy.voidsetEscalationTime(int sec) Sets the escalation time of this action.voidSets the perform action policy.toString()Returns string representation of this action.protected voidtoXML(COM.TIBCO.hawk.util.xml.XmlWriter out) Write XML representation of the action to the XML writer.Methods inherited from class COM.TIBCO.hawk.config.rbengine.rulebase.Action
getMethodInvocation, getMicroAgentName, getProperties, setMethodInvocation, setMicroAgentName, setPropertiesMethods inherited from class COM.TIBCO.hawk.config.rbengine.rulebase.RulebaseElement
fromXML, fromXML, getName, getSchedule, loadFromFile, saveToFile, setName, setSchedule, toXML, toXML
-
Field Details
-
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 stringmi- method invocation for this action- Throws:
IllegalArgumentException- if microagent name is null or empty stringIllegalArgumentException- 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
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
Returns the perform action policy. -
toString
Returns string representation of this action. -
equals
Compares two ConsequenceActions for equality. -
clone
Returns a copy of this object- Specified by:
clonein classRulebaseElement
-
toXML
Write XML representation of the action to the XML writer.- Overrides:
toXMLin classAction- Parameters:
out- the XML writer where the output will be written.- Throws:
IOExceptionRulebaseException- See Also:
-
XmlWriter
-
fromXML
Read XML representation of the action from the XML node.- Overrides:
fromXMLin classAction- Parameters:
node- the XML node containing the action.- Throws:
RulebaseException- See Also:
-
XmlElementNode
-