Class SimpleFlowFactoryBean

All Implemented Interfaces:
org.springframework.beans.factory.FactoryBean<SimpleFlow>, org.springframework.beans.factory.InitializingBean

public class SimpleFlowFactoryBean extends Object implements org.springframework.beans.factory.FactoryBean<SimpleFlow>, org.springframework.beans.factory.InitializingBean
Convenience factory for SimpleFlow instances for use in the XML namespace. It replaces the states in the input with proxies that have a unique name formed from the flow name and the original state name (unless the name is already in that form -- in that case, it is not modified).
Dave Syer, Michael Minella
  • Constructor Details

    • SimpleFlowFactoryBean

      public SimpleFlowFactoryBean()
  • Method Details

    • setStateTransitionComparator

      public void setStateTransitionComparator(Comparator<StateTransition> stateTransitionComparator)
      stateTransitionComparator - Comparator implementation that addresses the ordering of state evaluation.
    • setFlowType

      public void setFlowType(Class<SimpleFlow> flowType)
      flowType - Used to inject the type of flow (regular Spring Batch or JSR-352).
    • setName

      public void setName(String name)
      The name of the flow that is created by this factory.
      name - the value of the name
    • setStateTransitions

      public void setStateTransitions(List<StateTransition> stateTransitions)
      The raw state transitions for the flow. They are transformed into proxies that have the same behavior but unique names prefixed with the flow name.
      stateTransitions - the list of transitions
    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Check mandatory properties (name).
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Exception - thrown if error occurs.
    • getObject

      public SimpleFlow getObject() throws Exception
      Specified by:
      getObject in interface org.springframework.beans.factory.FactoryBean<SimpleFlow>
    • createNewStepState

      protected State createNewStepState(State state, String oldName, String stateName)
      Provides an extension point to provide alternative StepState implementations within a SimpleFlow.
      state - The state that is used to create the StepState.
      oldName - The name to be replaced.
      stateName - The name for the new State.
      a state for the requested data.
    • getObjectType

      public Class<?> getObjectType()
      Specified by:
      getObjectType in interface org.springframework.beans.factory.FactoryBean<SimpleFlow>
    • isSingleton

      public boolean isSingleton()
      Specified by:
      isSingleton in interface org.springframework.beans.factory.FactoryBean<SimpleFlow>