Class DefaultStateMachineEventPublisher
java.lang.Object
org.springframework.statemachine.event.DefaultStateMachineEventPublisher
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationEventPublisherAware
,StateMachineEventPublisher
public class DefaultStateMachineEventPublisher
extends Object
implements StateMachineEventPublisher, org.springframework.context.ApplicationEventPublisherAware
Default implementation of
StateMachineEventPublisher
.-
Constructor Summary
ConstructorDescriptionInstantiates a new state machine event publisher.DefaultStateMachineEventPublisher
(org.springframework.context.ApplicationEventPublisher applicationEventPublisher) Instantiates a new state machine event publisher. -
Method Summary
Modifier and TypeMethodDescriptionvoid
publishEventNotAccepted
(Object source, org.springframework.messaging.Message<?> event) Publish event not accepted event.void
publishExtendedStateChanged
(Object source, Object key, Object value) Publish extended state changed.void
publishStateChanged
(Object source, State<?, ?> sourceState, State<?, ?> targetState) Publish a state changed event.void
publishStateEntered
(Object source, State<?, ?> state) Publish a state entered event.void
publishStateExited
(Object source, State<?, ?> state) Publish a state exited event.void
publishStateMachineError
(Object source, StateMachine<?, ?> stateMachine, Exception exception) Publish a state machine error.void
publishStateMachineStart
(Object source, StateMachine<?, ?> stateMachine) Publish a statemachine start event.void
publishStateMachineStop
(Object source, StateMachine<?, ?> stateMachine) Publish a statemachine stop event.void
publishTransition
(Object source, Transition<?, ?> transition) Publish a transition event.void
publishTransitionEnd
(Object source, Transition<?, ?> transition) Publish a transition end event.void
publishTransitionStart
(Object source, Transition<?, ?> transition) Publish a transition start event.void
setApplicationEventPublisher
(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
-
Constructor Details
-
DefaultStateMachineEventPublisher
public DefaultStateMachineEventPublisher()Instantiates a new state machine event publisher. -
DefaultStateMachineEventPublisher
public DefaultStateMachineEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher) Instantiates a new state machine event publisher.- Parameters:
applicationEventPublisher
- the application event publisher
-
-
Method Details
-
setApplicationEventPublisher
public void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher) - Specified by:
setApplicationEventPublisher
in interfaceorg.springframework.context.ApplicationEventPublisherAware
-
publishStateChanged
Description copied from interface:StateMachineEventPublisher
Publish a state changed event.- Specified by:
publishStateChanged
in interfaceStateMachineEventPublisher
- Parameters:
source
- the component generated this eventsourceState
- the source statetargetState
- the target state
-
publishStateEntered
Description copied from interface:StateMachineEventPublisher
Publish a state entered event.- Specified by:
publishStateEntered
in interfaceStateMachineEventPublisher
- Parameters:
source
- the sourcestate
- the state
-
publishStateExited
Description copied from interface:StateMachineEventPublisher
Publish a state exited event.- Specified by:
publishStateExited
in interfaceStateMachineEventPublisher
- Parameters:
source
- the sourcestate
- the state
-
publishEventNotAccepted
Description copied from interface:StateMachineEventPublisher
Publish event not accepted event.- Specified by:
publishEventNotAccepted
in interfaceStateMachineEventPublisher
- Parameters:
source
- the sourceevent
- the event
-
publishTransitionStart
Description copied from interface:StateMachineEventPublisher
Publish a transition start event.- Specified by:
publishTransitionStart
in interfaceStateMachineEventPublisher
- Parameters:
source
- the sourcetransition
- the transition
-
publishTransitionEnd
Description copied from interface:StateMachineEventPublisher
Publish a transition end event.- Specified by:
publishTransitionEnd
in interfaceStateMachineEventPublisher
- Parameters:
source
- the sourcetransition
- the transition
-
publishTransition
Description copied from interface:StateMachineEventPublisher
Publish a transition event.- Specified by:
publishTransition
in interfaceStateMachineEventPublisher
- Parameters:
source
- the sourcetransition
- the transition
-
publishStateMachineStart
Description copied from interface:StateMachineEventPublisher
Publish a statemachine start event.- Specified by:
publishStateMachineStart
in interfaceStateMachineEventPublisher
- Parameters:
source
- the sourcestateMachine
- the statemachine
-
publishStateMachineStop
Description copied from interface:StateMachineEventPublisher
Publish a statemachine stop event.- Specified by:
publishStateMachineStop
in interfaceStateMachineEventPublisher
- Parameters:
source
- the sourcestateMachine
- the statemachine
-
publishStateMachineError
public void publishStateMachineError(Object source, StateMachine<?, ?> stateMachine, Exception exception) Description copied from interface:StateMachineEventPublisher
Publish a state machine error.- Specified by:
publishStateMachineError
in interfaceStateMachineEventPublisher
- Parameters:
source
- the sourcestateMachine
- the state machineexception
- the exception
-
publishExtendedStateChanged
Description copied from interface:StateMachineEventPublisher
Publish extended state changed.- Specified by:
publishExtendedStateChanged
in interfaceStateMachineEventPublisher
- Parameters:
source
- the sourcekey
- the keyvalue
- the value
-