public abstract class AbstractFilteredState extends AbstractWrappedState implements MessageFilter<State,StateContext>
State.StateBuilderstateid, name| Constructor and Description |
|---|
AbstractFilteredState(@NonNull State state)
Constructor with the state to wrap
|
| Modifier and Type | Method and Description |
|---|---|
abstract MessageFilter<State,StateContext> |
getMessageFilter()
Retrieves the message filter
|
Status |
onDispatch(StateContext context)
Intercepts a message to be dispatched to the
given destination.
|
Status |
onReceive(StateContext context)
Intercepts a message to be received from the
given origin.
|
abstract void |
setDispatchHandler(Function<StateContext,Status> dispatchHandler)
Sets the dispatch handler for ANY message
|
abstract void |
setDispatchHandler(Message message,
Function<StateContext,Status> dispatchHandler)
Sets the dispatch handler for the given message
|
abstract void |
setReceptionHandler(Function<StateContext,Status> receptionHandler)
Sets the reception handler for ANY message
|
abstract void |
setReceptionHandler(Message message,
Function<StateContext,Status> receptionHandler)
Sets the reception handler for the given message
|
equals, getName, hashCode, isFinal, setFinaladdProperty, from, getProperty, hasProperties, hasProperty, merge, named, removeProperty, toStringgetIdpublic AbstractFilteredState(@NonNull
@NonNull State state)
state - the state to wrappublic abstract MessageFilter<State,StateContext> getMessageFilter()
public abstract void setReceptionHandler(Function<StateContext,Status> receptionHandler)
receptionHandler - the reception handlerpublic abstract void setReceptionHandler(Message message, Function<StateContext,Status> receptionHandler)
message - the messagereceptionHandler - the reception handlerpublic abstract void setDispatchHandler(Function<StateContext,Status> dispatchHandler)
dispatchHandler - the dispatch handlerpublic abstract void setDispatchHandler(Message message, Function<StateContext,Status> dispatchHandler)
message - the messagedispatchHandler - the dispatch handlerpublic Status onDispatch(StateContext context)
onDispatch in interface MessageFilter<State,StateContext>context - the contextpublic Status onReceive(StateContext context)
onReceive in interface MessageFilter<State,StateContext>context - the contextCopyright © 2019 state-machine. All rights reserved.