Example usage for org.springframework.statemachine StateContext getMessage

List of usage examples for org.springframework.statemachine StateContext getMessage

Introduction

In this page you can find the example usage for org.springframework.statemachine StateContext getMessage.

Prototype

Message<E> getMessage();

Source Link

Document

Gets the message associated with a context.

Usage

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

protected void notifyEventNotAccepted(StateContext<S, E> stateContext) {
    try {//w  w  w .  jav a2 s . c  o 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);
    }
}