Class BeanFactoryStepLocator
- java.lang.Object
- org.springframework.batch.integration.partition.BeanFactoryStepLocator
- All Implemented Interfaces:
StepLocator
,org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanFactoryAware
public class BeanFactoryStepLocator extends java.lang.Object implements StepLocator, org.springframework.beans.factory.BeanFactoryAware
AStepLocator
implementation that just looks in its enclosing bean factory for components of typeStep
.- Author:
- Dave Syer
Constructor Summary
Constructors Constructor Description BeanFactoryStepLocator()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Step
getStep(java.lang.String stepName)
Look up a bean with the provided name of typeStep
.java.util.Collection<java.lang.String>
getStepNames()
Look in the bean factory for all beans of typeStep
.void
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
Method Detail
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException
- Specified by:
setBeanFactory
in interfaceorg.springframework.beans.factory.BeanFactoryAware
- Throws:
org.springframework.beans.BeansException
getStep
public Step getStep(java.lang.String stepName)
Look up a bean with the provided name of typeStep
.- Specified by:
getStep
in interfaceStepLocator
- See Also:
StepLocator.getStep(String)
getStepNames
public java.util.Collection<java.lang.String> getStepNames()
Look in the bean factory for all beans of typeStep
.- Specified by:
getStepNames
in interfaceStepLocator
- Throws:
java.lang.IllegalStateException
- if theBeanFactory
is not listable- See Also:
StepLocator.getStepNames()