Example usage for org.springframework.statemachine.listener StateMachineListener stateMachineError

List of usage examples for org.springframework.statemachine.listener StateMachineListener stateMachineError

Introduction

In this page you can find the example usage for org.springframework.statemachine.listener StateMachineListener stateMachineError.

Prototype

void stateMachineError(StateMachine<S, E> stateMachine, Exception exception);

Source Link

Document

Notified when statemachine enters error it can't recover from.

Usage

From source file:org.springframework.statemachine.listener.CompositeStateMachineListener.java

@Override
public void stateMachineError(StateMachine<S, E> stateMachine, Exception exception) {
    for (Iterator<StateMachineListener<S, E>> iterator = getListeners().reverse(); iterator.hasNext();) {
        StateMachineListener<S, E> listener = iterator.next();
        try {// w w  w .ja  v a2  s.c o m
            listener.stateMachineError(stateMachine, exception);
        } catch (Throwable e) {
            log.warn("Error during stateMachineError", e);
        }
    }
}