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.- Author:
- Janne Valkealahti
-
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a new state machine event publisher.DefaultStateMachineEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher) Instantiates a new state machine event publisher. -
Method Summary
Modifier and TypeMethodDescriptionvoidpublishEventNotAccepted(Object source, org.springframework.messaging.Message<?> event) Publish event not accepted event.voidpublishExtendedStateChanged(Object source, Object key, Object value) Publish extended state changed.voidpublishStateChanged(Object source, State<?, ?> sourceState, State<?, ?> targetState) Publish a state changed event.voidpublishStateEntered(Object source, State<?, ?> state) Publish a state entered event.voidpublishStateExited(Object source, State<?, ?> state) Publish a state exited event.voidpublishStateMachineError(Object source, StateMachine<?, ?> stateMachine, Exception exception) Publish a state machine error.voidpublishStateMachineStart(Object source, StateMachine<?, ?> stateMachine) Publish a statemachine start event.voidpublishStateMachineStop(Object source, StateMachine<?, ?> stateMachine) Publish a statemachine stop event.voidpublishTransition(Object source, Transition<?, ?> transition) Publish a transition event.voidpublishTransitionEnd(Object source, Transition<?, ?> transition) Publish a transition end event.voidpublishTransitionStart(Object source, Transition<?, ?> transition) Publish a transition start event.voidsetApplicationEventPublisher(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:
setApplicationEventPublisherin interfaceorg.springframework.context.ApplicationEventPublisherAware
-
publishStateChanged
Description copied from interface:StateMachineEventPublisherPublish a state changed event.- Specified by:
publishStateChangedin interfaceStateMachineEventPublisher- Parameters:
source- the component generated this eventsourceState- the source statetargetState- the target state
-
publishStateEntered
Description copied from interface:StateMachineEventPublisherPublish a state entered event.- Specified by:
publishStateEnteredin interfaceStateMachineEventPublisher- Parameters:
source- the sourcestate- the state
-
publishStateExited
Description copied from interface:StateMachineEventPublisherPublish a state exited event.- Specified by:
publishStateExitedin interfaceStateMachineEventPublisher- Parameters:
source- the sourcestate- the state
-
publishEventNotAccepted
Description copied from interface:StateMachineEventPublisherPublish event not accepted event.- Specified by:
publishEventNotAcceptedin interfaceStateMachineEventPublisher- Parameters:
source- the sourceevent- the event
-
publishTransitionStart
Description copied from interface:StateMachineEventPublisherPublish a transition start event.- Specified by:
publishTransitionStartin interfaceStateMachineEventPublisher- Parameters:
source- the sourcetransition- the transition
-
publishTransitionEnd
Description copied from interface:StateMachineEventPublisherPublish a transition end event.- Specified by:
publishTransitionEndin interfaceStateMachineEventPublisher- Parameters:
source- the sourcetransition- the transition
-
publishTransition
Description copied from interface:StateMachineEventPublisherPublish a transition event.- Specified by:
publishTransitionin interfaceStateMachineEventPublisher- Parameters:
source- the sourcetransition- the transition
-
publishStateMachineStart
Description copied from interface:StateMachineEventPublisherPublish a statemachine start event.- Specified by:
publishStateMachineStartin interfaceStateMachineEventPublisher- Parameters:
source- the sourcestateMachine- the statemachine
-
publishStateMachineStop
Description copied from interface:StateMachineEventPublisherPublish a statemachine stop event.- Specified by:
publishStateMachineStopin interfaceStateMachineEventPublisher- Parameters:
source- the sourcestateMachine- the statemachine
-
publishStateMachineError
public void publishStateMachineError(Object source, StateMachine<?, ?> stateMachine, Exception exception) Description copied from interface:StateMachineEventPublisherPublish a state machine error.- Specified by:
publishStateMachineErrorin interfaceStateMachineEventPublisher- Parameters:
source- the sourcestateMachine- the state machineexception- the exception
-
publishExtendedStateChanged
Description copied from interface:StateMachineEventPublisherPublish extended state changed.- Specified by:
publishExtendedStateChangedin interfaceStateMachineEventPublisher- Parameters:
source- the sourcekey- the keyvalue- the value
-