Example usage for org.springframework.statemachine.support StateMachineContextUtils getEventPublisher

List of usage examples for org.springframework.statemachine.support StateMachineContextUtils getEventPublisher

Introduction

In this page you can find the example usage for org.springframework.statemachine.support StateMachineContextUtils getEventPublisher.

Prototype

public static StateMachineEventPublisher getEventPublisher(BeanFactory beanFactory) 

Source Link

Document

Return the StateMachineEventPublisher bean whose name is "stateMachineEventPublisher" if available.

Usage

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

/**
 * Gets the state machine event publisher.
 *
 * @return the state machine event publisher
 *///  w w w  . j a  v  a 2 s  . c  o m
protected StateMachineEventPublisher getStateMachineEventPublisher() {
    if (stateMachineEventPublisher == null && getBeanFactory() != null) {
        if (log.isTraceEnabled()) {
            log.trace("getting stateMachineEventPublisher service from bean factory " + getBeanFactory());
        }
        stateMachineEventPublisher = StateMachineContextUtils.getEventPublisher(getBeanFactory());
    }
    return stateMachineEventPublisher;
}