S
- the type of state of a FiniteStateMachine
public interface LifecycleAwareEvent<S extends Enum<S>> extends Event<S>
LifecycleAwareEvent
is a specialized Event
that
receives callbacks during the processing of the Event
by
a FiniteStateMachine
.Modifier and Type | Method and Description |
---|---|
boolean |
onAccept(ExecutionContext context)
Called by a
FiniteStateMachine when the LifecycleAwareEvent
is initially about to be accepted for processing. |
void |
onProcessed(ExecutionContext context)
Called by a
FiniteStateMachine when the LifecycleAwareEvent
has been processed. |
void |
onProcessing(ExecutionContext context)
Called by a
FiniteStateMachine when the LifecycleAwareEvent
is about to be processed. |
getDesiredState
boolean onAccept(ExecutionContext context)
FiniteStateMachine
when the LifecycleAwareEvent
is initially about to be accepted for processing.context
- the ExecutionContext
for the Event
true
if the Event
should be accepted, or
false
if the FiniteStateMachine
should
ignore the LifecycleAwareEvent
void onProcessing(ExecutionContext context)
FiniteStateMachine
when the LifecycleAwareEvent
is about to be processed.context
- the ExecutionContext
for the Event
void onProcessed(ExecutionContext context)
FiniteStateMachine
when the LifecycleAwareEvent
has been processed.context
- the ExecutionContext
for the Event