|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjade.core.behaviours.DistilledStateChartTransition
public class DistilledStateChartTransition
DistilledStateChartTransition: basic transition class.
Field Summary | |
---|---|
static int |
DEEP_HISTORY
Indicates that the transition uses deep history for its target state |
static int |
NO_HISTORY
Indicates that the transition doesn't use history for its target state |
static int |
SHALLOW_HISTORY
Indicates that the transition uses shallow history for its target state |
Constructor Summary | |
---|---|
DistilledStateChartTransition()
Default constructor. |
|
DistilledStateChartTransition(java.lang.String aName,
jade.core.behaviours.Behaviour tgt)
Default constructor. |
|
DistilledStateChartTransition(java.lang.String aName,
jade.core.behaviours.Behaviour tgt,
int history)
Constructor that sets also the history. |
Method Summary | |
---|---|
void |
action(jade.lang.acl.ACLMessage msg)
This method is invoked when a transition is firing. |
int |
getHistory()
Return the history type. |
jade.core.behaviours.Behaviour |
getTarget()
Return the behaviour that is assigned as the target of the transition. |
java.lang.String |
getTransitionName()
Return the name of the transition. |
void |
setHistory(int history)
Set the history type. |
void |
setTarget(jade.core.behaviours.Behaviour aTarget)
Set the target state. |
void |
setTransitionName(java.lang.String n)
Set the name of the transition. |
boolean |
trigger(jade.core.behaviours.Behaviour source,
jade.lang.acl.ACLMessage msg)
This method is used to test if the transition can fire. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NO_HISTORY
public static final int SHALLOW_HISTORY
public static final int DEEP_HISTORY
Constructor Detail |
---|
public DistilledStateChartTransition()
public DistilledStateChartTransition(java.lang.String aName, jade.core.behaviours.Behaviour tgt)
DistilledStateChartBehaviour
.
It will throw a runtime exception if you have not done this.
aName
- a String name of the transitiontgt
- the target behaviour
java.lang.RuntimeException
- if we are adding a behaviour that has not
already been assigned to a DSC.public DistilledStateChartTransition(java.lang.String aName, jade.core.behaviours.Behaviour tgt, int history)
aName
- a string name of the transitiontgt
- the target behaviourhistory
- history type to use for target state
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
Method Detail |
---|
public void action(jade.lang.acl.ACLMessage msg)
msg
- the ACLMessage that caused the transition to fire.public boolean trigger(jade.core.behaviours.Behaviour source, jade.lang.acl.ACLMessage msg)
source
- The behaviour that is the source of the transition.msg
- the ACLMessage to test. The msg could be a DistilledStateChartEvent
object.
public java.lang.String getTransitionName()
public void setTransitionName(java.lang.String n)
n
- the name of the transition.public jade.core.behaviours.Behaviour getTarget()
public void setTarget(jade.core.behaviours.Behaviour aTarget)
aTarget
- the target state.
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
.public int getHistory()
public void setHistory(int history)
history
- The history type.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |