jade.core.behaviours
Class DistilledStateChartTemplateTransition
java.lang.Object
jade.core.behaviours.DistilledStateChartTransition
jade.core.behaviours.DistilledStateChartTemplateTransition
- All Implemented Interfaces:
- java.io.Serializable
public class DistilledStateChartTemplateTransition
- extends DistilledStateChartTransition
DistilledStateChartTemplateTransition: transition defined to match a specific MessageTemplate.
- Author:
- G. Fortino, F. Rango
- See Also:
- Serialized Form
Constructor Summary |
DistilledStateChartTemplateTransition(java.lang.String aName,
jade.core.behaviours.Behaviour tgt,
int history,
jade.lang.acl.MessageTemplate aTemplate)
Constructor that sets also the history. |
DistilledStateChartTemplateTransition(java.lang.String aName,
jade.core.behaviours.Behaviour tgt,
jade.lang.acl.MessageTemplate aTemplate)
Default constructor. |
Method Summary |
boolean |
trigger(jade.core.behaviours.Behaviour source,
jade.lang.acl.ACLMessage msg)
Trigger that watches for specified MessageTemplate. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DistilledStateChartTemplateTransition
public DistilledStateChartTemplateTransition(java.lang.String aName,
jade.core.behaviours.Behaviour tgt,
jade.lang.acl.MessageTemplate aTemplate)
- Default constructor. The code requires that the behaviour that you are adding
has already been added as a state in the parent
DistilledStateChartBehaviour
.
It will throw a runtime exception if you have not done this.
- Parameters:
aName
- a String name of the transitiontgt
- the target behaviouraTemplate
- the MessageTemplate
- Throws:
java.lang.RuntimeException
- if we are adding a behaviour that has not
already been assigned to a DSC.
DistilledStateChartTemplateTransition
public DistilledStateChartTemplateTransition(java.lang.String aName,
jade.core.behaviours.Behaviour tgt,
int history,
jade.lang.acl.MessageTemplate aTemplate)
- Constructor that sets also the history.
- Parameters:
aName
- a String name of the transitiontgt
- the target behaviourhistory
- history type to use for target stateaTemplate
- the MessageTemplate
- Throws:
java.lang.RuntimeException
- if we are adding a behaviour that has not
already been assigned to a DSC or if we set shallow or deep history and target state
isn't a DistilledStateChartBehaviour
trigger
public boolean trigger(jade.core.behaviours.Behaviour source,
jade.lang.acl.ACLMessage msg)
- Trigger that watches for specified MessageTemplate.
- Overrides:
trigger
in class DistilledStateChartTransition
- Parameters:
source
- The behaviour that is the source of the transition.msg
- The ACLMessage that we check to see if it matches.
- Returns:
- A boolean indicating that the transition is ready to fire.