public class FSM extends Object implements Runnable, Serializable
| Modifier and Type | Field and Description |
|---|---|
protected State |
end |
protected Logger |
logger |
protected ScheduledExecutorService |
scheduler |
protected State |
start |
protected State |
state |
protected ScheduledFuture |
timer |
| Constructor and Description |
|---|
FSM(ScheduledExecutorService scheduler) |
| Modifier and Type | Method and Description |
|---|---|
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) |
protected State start
protected State end
protected State state
protected ScheduledExecutorService scheduler
protected ScheduledFuture timer
protected Logger logger
public FSM(ScheduledExecutorService scheduler)
public void setLogger(Logger logger)
public State getState()
public void setStart(String name)
public void setEnd(String name)
public void removeAttribute(String name)
public Transition createTransition(String name, String from, String to)
public Transition createTimeoutTransition(String from, String to, long timeout)
public void signal(String name) throws UnknownTransitionException
name - the name of transition.UnknownTransitionExceptionpublic void signalAsync(String name)
Copyright © 2017 TeleStax, Inc.. All Rights Reserved.