S
- the type of stateE
- the type of eventpublic interface Region<S,E>
Modifier and Type | Method and Description |
---|---|
void |
addStateListener(StateMachineListener<S,E> listener)
Adds the state listener.
|
java.lang.String |
getId()
Gets the region and state machine id.
|
State<S,E> |
getState()
Gets the current
State . |
java.util.Collection<State<S,E>> |
getStates()
Gets the
State s defined in this region. |
java.util.Collection<Transition<S,E>> |
getTransitions()
Gets a
Transition s for this region. |
java.util.UUID |
getUuid()
Gets the region and state machine unique id.
|
boolean |
isComplete()
Checks if region complete.
|
void |
removeStateListener(StateMachineListener<S,E> listener)
Removes the state listener.
|
boolean |
sendEvent(E event)
Send an event
E to the region. |
boolean |
sendEvent(org.springframework.messaging.Message<E> event)
Send an event
E wrapped with a Message to the region. |
void |
start()
Start the region.
|
void |
stop()
Stop the region.
|
java.util.UUID getUuid()
java.lang.String getId()
void start()
void stop()
boolean sendEvent(org.springframework.messaging.Message<E> event)
E
wrapped with a Message
to the region.event
- the wrapped event to sendboolean sendEvent(E event)
E
to the region.event
- the event to sendjava.util.Collection<State<S,E>> getStates()
State
s defined in this region. Returned collection is
an unmodifiable copy because states in a state machine are immutable.java.util.Collection<Transition<S,E>> getTransitions()
Transition
s for this region.boolean isComplete()
void addStateListener(StateMachineListener<S,E> listener)
listener
- the listenervoid removeStateListener(StateMachineListener<S,E> listener)
listener
- the listener