org.apache.taglibs.rdc.scxml.model
Class Transition

java.lang.Object
  extended byorg.apache.taglibs.rdc.scxml.model.Executable
      extended byorg.apache.taglibs.rdc.scxml.model.Transition
All Implemented Interfaces:
Observable

public class Transition
extends Executable
implements Observable

The class in this SCXML object model that corresponds to the <transition> SCXML element. Transition rules are triggered by "events" and conditionalized via "guard-conditions".

Author:
Rahul Akolkar, Jaroslav Gergic

Field Summary
 
Fields inherited from class org.apache.taglibs.rdc.scxml.model.Executable
parent
 
Constructor Summary
Transition()
          Constructor
 
Method Summary
 void addListener(SCXMLListener lst)
          Register a listener to this document root
 java.lang.String getCond()
          Get the guard condition (may be null)
 java.lang.String getEvent()
          Get the event that will trigger this transition (pending evaluation of the guard condition in favor)
 java.lang.String getNext()
          Get the ID of the transition target (may be null, if, for example, the target is specified inline)
 NotificationRegistry getNotificationRegistry()
          Get the notification registry.
 Path getPath()
          Get the path of this transiton.
 TransitionTarget getRuntimeTarget()
          Get the runtime transition target, which always resolves to a TransitionTarget instance.
 TransitionTarget getTarget()
          Get the transition target (may be null)
 void removeListener(SCXMLListener lst)
          Deregister a listener from this document root
 void setCond(java.lang.String cond)
          Set the guard condition
 void setEvent(java.lang.String event)
          Set the event that will trigger this transition (pending evaluation of the guard condition in favor)
 void setNext(java.lang.String next)
          Set the transition target by specifying its ID
 void setNotificationRegistry(NotificationRegistry reg)
          Supply this Transition object a handle to the notification registry.
 void setTarget(TransitionTarget target)
          Set the transition target
 
Methods inherited from class org.apache.taglibs.rdc.scxml.model.Executable
addAction, getActions, getParent, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Transition

public Transition()
Constructor

Method Detail

addListener

public void addListener(SCXMLListener lst)
Register a listener to this document root

Specified by:
addListener in interface Observable
Parameters:
lst - The SCXMLListener to add

removeListener

public void removeListener(SCXMLListener lst)
Deregister a listener from this document root

Specified by:
removeListener in interface Observable
Parameters:
lst - The SCXMLListener to remove

getCond

public java.lang.String getCond()
Get the guard condition (may be null)

Returns:
Returns the cond.

setCond

public void setCond(java.lang.String cond)
Set the guard condition

Parameters:
cond - The cond to set.

getEvent

public java.lang.String getEvent()
Get the event that will trigger this transition (pending evaluation of the guard condition in favor)

Returns:
Returns the event.

setEvent

public void setEvent(java.lang.String event)
Set the event that will trigger this transition (pending evaluation of the guard condition in favor)

Parameters:
event - The event to set.

getTarget

public TransitionTarget getTarget()
Get the transition target (may be null)

Returns:
Returns the target as specified in SCXML markup.

Remarks: Is null for "stay" transitions. Returns parent (the source node) for "self" transitions.


getRuntimeTarget

public TransitionTarget getRuntimeTarget()
Get the runtime transition target, which always resolves to a TransitionTarget instance.

Returns:
Returns the actual target of a transition at runtime.

Remarks: For both the "stay" and "self" transitions it returns parent (the source node). This method should never return null.


setTarget

public void setTarget(TransitionTarget target)
Set the transition target

Parameters:
target - The target to set.

getNext

public java.lang.String getNext()
Get the ID of the transition target (may be null, if, for example, the target is specified inline)

Returns:
Returns the transition target ID (used by SCXML Digester only).
See Also:
getTarget()

setNext

public void setNext(java.lang.String next)
Set the transition target by specifying its ID

Parameters:
next - The the transition target ID (used by SCXML Digester only).
See Also:
setTarget(TransitionTarget)

setNotificationRegistry

public void setNotificationRegistry(NotificationRegistry reg)
Supply this Transition object a handle to the notification registry. Called by the Digester after instantiation.

Parameters:
reg - The notification registry

getNotificationRegistry

public NotificationRegistry getNotificationRegistry()
Get the notification registry.

Returns:
The notification registry.

getPath

public Path getPath()
Get the path of this transiton.

Returns:
returns the transition path
See Also:
Path


Copyright ? 2000-2004 The Apache Software Foundation. All Rights Reserved.