Example usage for org.springframework.statemachine.event StateMachineEventPublisher publishEventNotAccepted

List of usage examples for org.springframework.statemachine.event StateMachineEventPublisher publishEventNotAccepted

Introduction

In this page you can find the example usage for org.springframework.statemachine.event StateMachineEventPublisher publishEventNotAccepted.

Prototype

void publishEventNotAccepted(Object source, Message<?> event);

Source Link

Document

Publish event not accepted event.

Usage

From source file:org.springframework.statemachine.support.StateMachineObjectSupport.java

protected void notifyEventNotAccepted(StateContext<S, E> stateContext) {
    try {/*from w ww .j ava2  s .co m*/
        stateMachineHandlerCallHelper.callOnEventNotAccepted(getBeanName(), stateContext);
        stateListener.eventNotAccepted(stateContext.getMessage());
        stateListener.stateContext(stateContext);
        if (contextEventsEnabled) {
            StateMachineEventPublisher eventPublisher = getStateMachineEventPublisher();
            if (eventPublisher != null) {
                eventPublisher.publishEventNotAccepted(this, stateContext.getMessage());
            }
        }
    } catch (Throwable e) {
        log.warn("Error during notifyEventNotAccepted", e);
    }
}