org.mobicents.fsm
Class FSM

java.lang.Object
  extended by org.mobicents.fsm.FSM
All Implemented Interfaces:
Serializable, Runnable
Direct Known Subclasses:
Link

public class FSM
extends Object
implements Runnable, Serializable

Author:
kulikov
See Also:
Serialized Form

Field Summary
protected  State end
           
protected  Logger logger
           
protected  ScheduledExecutorService scheduler
           
protected  State start
           
protected  State state
           
protected  ScheduledFuture timer
           
 
Constructor Summary
FSM(ScheduledExecutorService scheduler)
           
 
Method Summary
 State createState(String name)
           
 Transition createTimeoutTransition(String from, String to, long timeout)
           
 Transition createTransition(String name, String from, String to)
           
 Object getAttribute(String name)
           
 State getState()
           
 void removeAttribute(String name)
           
 void run()
           
 void setAttribute(String name, Object value)
           
 void setEnd(String name)
           
 void setLogger(Logger logger)
           
 void setStart(String name)
           
 void signal(String name)
          Processes transition.
 void signalAsync(String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

start

protected State start

end

protected State end

state

protected State state

scheduler

protected ScheduledExecutorService scheduler

timer

protected ScheduledFuture timer

logger

protected Logger logger
Constructor Detail

FSM

public FSM(ScheduledExecutorService scheduler)
Method Detail

setLogger

public void setLogger(Logger logger)

getState

public State getState()

setStart

public void setStart(String name)

setEnd

public void setEnd(String name)

createState

public State createState(String name)

setAttribute

public void setAttribute(String name,
                         Object value)

getAttribute

public Object getAttribute(String name)

removeAttribute

public void removeAttribute(String name)

createTransition

public Transition createTransition(String name,
                                   String from,
                                   String to)

createTimeoutTransition

public Transition createTimeoutTransition(String from,
                                          String to,
                                          long timeout)

signal

public void signal(String name)
            throws UnknownTransitionException
Processes transition.

Parameters:
name - the name of transition.
Throws:
UnknownTransitionException

signalAsync

public void signalAsync(String name)

run

public void run()
Specified by:
run in interface Runnable


Copyright © 2013 TeleStax, Inc.. All Rights Reserved.