|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.batch.core.step.item.AbstractStepFactoryBean
public abstract class AbstractStepFactoryBean
Base class for factory beans for ItemOrientedStep
. Ensures that all
the mandatory properties are set, and provides basic support for the
Step
interface responsibilities like start limit. Supports
registration of ItemStream
s and StepListener
s.
SimpleStepFactoryBean
,
RepeatOperationsStepFactoryBean
Constructor Summary | |
---|---|
AbstractStepFactoryBean()
|
Method Summary | |
---|---|
protected void |
applyConfiguration(ItemOrientedStep step)
|
protected ItemReader |
getItemReader()
Protected getter for the ItemReader for subclasses to use. |
protected ItemWriter |
getItemWriter()
Protected getter for the ItemWriter for subclasses to use |
protected StepListener[] |
getListeners()
Protected getter for the StepListener s. |
String |
getName()
Public getter for the String. |
Object |
getObject()
Create a Step from the configuration provided. |
Class |
getObjectType()
|
protected TransactionAttribute |
getTransactionAttribute()
Protected getter for the TransactionAttribute for subclasses only. |
boolean |
isSingleton()
Returns true by default, but in most cases a Step should not be
treated as thread safe. |
void |
setAllowStartIfComplete(boolean allowStartIfComplete)
Public setter for the shouldAllowStartIfComplete. |
void |
setBeanName(String name)
Set the bean name property, which will become the name of the Step when it is created. |
void |
setItemReader(ItemReader itemReader)
|
void |
setItemWriter(ItemWriter itemWriter)
|
void |
setJobRepository(JobRepository jobRepository)
Public setter for JobRepository . |
void |
setListeners(StepListener[] listeners)
The listeners to inject into the Step . |
void |
setSingleton(boolean singleton)
Public setter for the singleton flag. |
void |
setStartLimit(int startLimit)
Public setter for the startLimit. |
void |
setStreams(ItemStream[] streams)
The streams to inject into the Step . |
void |
setTransactionAttribute(TransactionAttribute transactionAttribute)
Public setter for the TransactionAttribute . |
void |
setTransactionManager(PlatformTransactionManager transactionManager)
Public setter for the PlatformTransactionManager . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractStepFactoryBean()
Method Detail |
---|
public void setBeanName(String name)
Step
when it is created.
setBeanName
in interface BeanNameAware
BeanNameAware.setBeanName(java.lang.String)
public String getName()
public void setStartLimit(int startLimit)
startLimit
- the startLimit to setpublic void setAllowStartIfComplete(boolean allowStartIfComplete)
allowStartIfComplete
- the shouldAllowStartIfComplete to setpublic void setItemReader(ItemReader itemReader)
itemReader
- the itemReader to setpublic void setItemWriter(ItemWriter itemWriter)
itemWriter
- the itemWriter to setpublic void setStreams(ItemStream[] streams)
Step
. Any instance of
ItemStream
can be used, and will then receive callbacks at the
appropriate stage in the step.
streams
- an array of listenerspublic void setListeners(StepListener[] listeners)
Step
. Any instance of
StepListener
can be used, and will then receive callbacks at the
appropriate stage in the step.
listeners
- an array of listenersprotected StepListener[] getListeners()
StepListener
s.
protected ItemReader getItemReader()
ItemReader
for subclasses to use.
protected ItemWriter getItemWriter()
ItemWriter
for subclasses to use
public void setJobRepository(JobRepository jobRepository)
JobRepository
.
jobRepository
- is a mandatory dependence (no default).public void setTransactionManager(PlatformTransactionManager transactionManager)
PlatformTransactionManager
.
transactionManager
- the transaction manager to setpublic void setTransactionAttribute(TransactionAttribute transactionAttribute)
TransactionAttribute
.
transactionAttribute
- the TransactionAttribute
to setprotected TransactionAttribute getTransactionAttribute()
TransactionAttribute
for subclasses only.
public final Object getObject() throws Exception
Step
from the configuration provided.
getObject
in interface FactoryBean
Exception
FactoryBean.getObject()
protected void applyConfiguration(ItemOrientedStep step)
step
- public Class getObjectType()
getObjectType
in interface FactoryBean
public boolean isSingleton()
Step
should not be
treated as thread safe. Clients are recommended to create a new step for
each job execution.
isSingleton
in interface FactoryBean
FactoryBean.isSingleton()
public void setSingleton(boolean singleton)
singleton
- the value to set. Defaults to true.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |