|
Framework Professional Edition Package |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.prosyst.util.asm.Transition
public class Transition
The Transition object specifies a rule how the state of the ASM is changed. It specifies initial state and target state. There may be special transitions that has only target state and they are possible at any time. Those transition are named 'internal' transitions. The transition can be guarded by a 'guard condition'. It will allow or disallow the execution of the transition.
| Constructor Summary | |
|---|---|
Transition()
Creates an empty, but invalid transition. |
|
Transition(java.lang.String name,
java.lang.String toState)
Creates an internal transition with specified name, and target state. |
|
Transition(java.lang.String name,
java.lang.String fromState,
java.lang.String toState)
Creates a regular transition with the specified name, that will move to the target state if the current state is equal to the source state. |
|
Transition(java.lang.String name,
java.lang.String fromState,
java.lang.String toState,
org.osgi.framework.Filter filter)
Creates a regular transition with the specified name, that will move to the target state if the current state is equal to the source state. |
|
| Method Summary | |
|---|---|
org.osgi.framework.Filter |
getFilter()
Retrieves the guard condition of the transition |
java.lang.String |
getFromState()
Retrieves the source state |
java.lang.String |
getName()
Retrieves the name of the transition |
java.lang.String |
getToState()
Retrieves the target state |
void |
setFilter(org.osgi.framework.Filter filter)
Sets the guard condition of the transition |
void |
setFromState(java.lang.String fromState)
Sets the source state |
void |
setName(java.lang.String name)
Sets the name of the transition |
void |
setToState(java.lang.String toState)
Sets the target state |
boolean |
testGuardCondition(StateMachine context)
Validates the guard condition according the guard condition. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Transition()
public Transition(java.lang.String name,
java.lang.String toState)
StateMachineListener.executing(String, StateMachine)method.
name - the name of transitiontoState - the target state
public Transition(java.lang.String name,
java.lang.String fromState,
java.lang.String toState)
name - the name of the transitionfromState - the source state that ASM should be, in order to start the
execution of the transitiontoState - the target state that ASM would have, when the transition is
completed.
public Transition(java.lang.String name,
java.lang.String fromState,
java.lang.String toState,
org.osgi.framework.Filter filter)
name - the name of the transitionfromState - the source state that ASM should be, in order to start the
execution of the transitiontoState - the target state that ASM would have, when the transition is
completed.filter - the filter, specifying the guard condition. The state machine
matches the filter to it's properties.| Method Detail |
|---|
public java.lang.String getFromState()
public void setFromState(java.lang.String fromState)
fromState - The fromState to set.public java.lang.String getToState()
public void setToState(java.lang.String toState)
toState - The toState to set.public java.lang.String getName()
public void setName(java.lang.String name)
name - The name to set.public org.osgi.framework.Filter getFilter()
public void setFilter(org.osgi.framework.Filter filter)
filter - The filter to set.public boolean testGuardCondition(StateMachine context)
context - the state machine
true. Otherwise will return the result of the
Filter.match() method.public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
|
Framework Professional Edition Package |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||