| Constructor and Description |
|---|
StateMachine(String name) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(StateMachineListener listener) |
State |
createStartState(String name) |
State |
createState(String name) |
State |
createState(String name,
boolean isEndState) |
void |
eventHappens(Event event) |
Object |
getFromMachineState(Object key) |
State |
getState() |
boolean |
isMachineRunning() |
void |
kill()
This will kill the internal thread that fires the next event.
|
Object |
putFromMachineState(String key,
Object value) |
boolean |
register(Event event) |
void |
run() |
void |
startMachine(boolean startThread) |
boolean |
waitUntilDone(long timeout) |
public StateMachine(String name)
public boolean register(Event event)
public boolean add(StateMachineListener listener)
public State createStartState(String name) throws ConfigException
ConfigExceptionpublic void startMachine(boolean startThread)
throws ConfigException
ConfigExceptionpublic void eventHappens(Event event) throws ConfigException
ConfigExceptionpublic void kill()
public boolean isMachineRunning()
public boolean waitUntilDone(long timeout)
public State getState()
Copyright © 2016. All rights reserved.