| Modifier and Type | Method and Description |
|---|---|
void |
addEventHandler(StateMachineEventHandler<TState,TEvent> handler)
Adds an event handler
|
void |
defineHierarchyOn(TState superStateId,
TState initialSubStateId,
HistoryType historyType,
TState... subStateIds)
Defines a state hierarchy.
|
void |
fire(TEvent eventId,
Object... eventArguments)
Fires the specified event.
|
void |
firePriority(TEvent eventId,
Object... eventArguments)
Fires the specified priority event.
|
EntryActionSyntax<TState,TEvent> |
in(TState state) |
void |
initialize(TState initialState)
Initializes the state machine to the specified initial state.
|
boolean |
isExecuting()
Returns true if the state machine is executing events.
|
boolean |
isRunning()
Gets a value indicating whether this instance is running.
|
int |
numberOfQueuedEvents()
Returns the number of queued events.
|
void |
removeEventHandler(StateMachineEventHandler<TState,TEvent> handler)
Removes the given event handler.
|
String |
report()
Returns a report of this state machine with all states and transitions.
|
void |
start()
Starts the state machine.
|
void |
stop()
Stops the state machine.
|
void addEventHandler(StateMachineEventHandler<TState,TEvent> handler)
handler - the event handlervoid defineHierarchyOn(TState superStateId, TState initialSubStateId, HistoryType historyType, TState... subStateIds)
superStateId - the super state id.initialSubStateId - the initial sub state id.historyType - type of history.subStateIds - the sub state id's.void fire(TEvent eventId, Object... eventArguments)
eventId - the eventeventArguments - the event argumentsvoid firePriority(TEvent eventId, Object... eventArguments)
eventId - the event.eventArguments - the event arguments.EntryActionSyntax<TState,TEvent> in(TState state)
state - void initialize(TState initialState)
initialState - The state to which the state machine is initialized.boolean isExecuting()
boolean isRunning()
int numberOfQueuedEvents()
void removeEventHandler(StateMachineEventHandler<TState,TEvent> handler)
handler - the event handler to be removed.String report()
void start()
void stop()
Copyright © 2012 bbv Software Services AG. All Rights Reserved.