|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.batch.integration.file.FileToMessagesJobFactoryBean<T>
public class FileToMessagesJobFactoryBean<T>
A FactoryBean for a Job with a single step which just pumps messages
from a file into a channel. The channel has to be a DirectChannel to
ensure that failures propagate up to the step and fail the job execution.
Normally this job will be used in conjunction with a
JobLaunchingMessageHandler and a
ResourcePayloadAsJobParameterStrategy, so that the user can just send
a message to a request channel listing the files to be processed, and
everything else just happens by magic. After a failure the job will be
restarted just by sending it the same message.
| Constructor Summary | |
|---|---|
FileToMessagesJobFactoryBean()
|
|
| Method Summary | |
|---|---|
java.lang.Object |
getObject()
Creates a Job that can process a flat file or XML file into
messages. |
java.lang.Class<org.springframework.batch.core.Job> |
getObjectType()
Always returns Job. |
boolean |
isSingleton()
Always true. |
void |
setBeanName(java.lang.String name)
|
void |
setChannel(org.springframework.integration.core.MessageChannel channel)
Public setter for the channel. |
void |
setItemReader(org.springframework.batch.item.ItemReader<? extends T> itemReader)
Public setter for the ItemReader. |
void |
setJobRepository(org.springframework.batch.core.repository.JobRepository jobRepository)
Public setter for the JobRepository. |
void |
setTransactionManager(org.springframework.transaction.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 FileToMessagesJobFactoryBean()
| Method Detail |
|---|
public void setBeanName(java.lang.String name)
setBeanName in interface org.springframework.beans.factory.BeanNameAwarepublic void setItemReader(org.springframework.batch.item.ItemReader<? extends T> itemReader)
ItemReader. Must be either a
FlatFileItemReader or a StaxEventItemReader. In either
case there is no need to set the resource property as it will be set by
this factory.
itemReader - the itemReader to setpublic void setChannel(org.springframework.integration.core.MessageChannel channel)
channel - the channel to setpublic void setJobRepository(org.springframework.batch.core.repository.JobRepository jobRepository)
JobRepository.
jobRepository - the job repository to setpublic void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
PlatformTransactionManager.
transactionManager - the transaction manager to set
public java.lang.Object getObject()
throws java.lang.Exception
Job that can process a flat file or XML file into
messages. To launch the job will require only a JobParameters
instance with a resource location as a URL.
getObject in interface org.springframework.beans.factory.FactoryBeanjava.lang.ExceptionFactoryBean.getObject()public java.lang.Class<org.springframework.batch.core.Job> getObjectType()
Job.
getObjectType in interface org.springframework.beans.factory.FactoryBeanFactoryBean.getObjectType()public boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBeanFactoryBean.isSingleton()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||