org.springframework.batch.integration.partition
Class BeanFactoryStepLocator

java.lang.Object
  extended by org.springframework.batch.integration.partition.BeanFactoryStepLocator
All Implemented Interfaces:
StepLocator, BeanFactoryAware

public class BeanFactoryStepLocator
extends Object
implements StepLocator, BeanFactoryAware

A StepLocator implementation that just looks in its enclosing bean factory for components of type Step.

Author:
Dave Syer

Constructor Summary
BeanFactoryStepLocator()
           
 
Method Summary
 Step getStep(String stepName)
          Look up a bean with the provided name of type Step.
 Collection<String> getStepNames()
          Look in the bean factory for all beans of type Step.
 void setBeanFactory(BeanFactory beanFactory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanFactoryStepLocator

public BeanFactoryStepLocator()
Method Detail

setBeanFactory

public void setBeanFactory(BeanFactory beanFactory)
                    throws BeansException
Specified by:
setBeanFactory in interface BeanFactoryAware
Throws:
BeansException

getStep

public Step getStep(String stepName)
Look up a bean with the provided name of type Step.

Specified by:
getStep in interface StepLocator
See Also:
StepLocator.getStep(String)

getStepNames

public Collection<String> getStepNames()
Look in the bean factory for all beans of type Step.

Specified by:
getStepNames in interface StepLocator
Throws:
IllegalStateException - if the BeanFactory is not listable
See Also:
StepLocator.getStepNames()


Copyright © 2011. All Rights Reserved.