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

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

Introduction

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

Prototype

void transition(Transition<S, E> transition);

Source Link

Document

Notified when transition happened.

Usage

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

@Override
public void transition(Transition<S, E> transition) {
    for (Iterator<StateMachineListener<S, E>> iterator = getListeners().reverse(); iterator.hasNext();) {
        StateMachineListener<S, E> listener = iterator.next();
        try {//w  w  w .ja  va2s  . c o  m
            listener.transition(transition);
        } catch (Throwable e) {
            log.warn("Error during transition", e);
        }
    }
}