Class FileSplitterSpec
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
org.springframework.integration.dsl.IntegrationComponentSpec<S,H>
org.springframework.integration.dsl.MessageHandlerSpec<FileSplitterSpec,FileSplitter>
org.springframework.integration.file.dsl.FileSplitterSpec
- All Implemented Interfaces:
Aware
,BeanClassLoaderAware
,BeanFactoryAware
,DisposableBean
,FactoryBean<FileSplitter>
,InitializingBean
,Lifecycle
,Phased
,SmartLifecycle
public class FileSplitterSpec extends MessageHandlerSpec<FileSplitterSpec,FileSplitter>
The
MessageHandlerSpec
for the FileSplitter
.- Since:
- 5.0
- Author:
- Artem Bilan
- See Also:
FileSplitter
-
Field Summary
Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
PARSER, target
-
Constructor Summary
Constructors Modifier Constructor Description protected
FileSplitterSpec()
protected
FileSplitterSpec(boolean iterator)
protected
FileSplitterSpec(boolean iterator, boolean markers)
-
Method Summary
Modifier and Type Method Description FileSplitterSpec
applySequence(boolean applySequence)
Aboolean
flag to indicate ifsequenceDetails
should be applied for messages based on the lines from file.FileSplitterSpec
charset(String charset)
Set the charset to be used when reading the file, when something other than the default charset is required.FileSplitterSpec
charset(Charset charset)
Set the charset to be used when reading the file, when something other than the default charset is required.protected FileSplitter
doGet()
FileSplitterSpec
firstLineAsHeader(String firstLineHeaderName)
Specify the header name for the first line to be carried as a header in the messages emitted for the remaining lines.FileSplitterSpec
markers()
FileSplitterSpec
markers(boolean asJson)
Specify ifFileSplitter
should emitFileSplitter.FileMarker
s and if they should be converted to the JSON string representation.Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, createInstance, destroyInstance, get, getId, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stop
Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
-
Constructor Details
-
FileSplitterSpec
protected FileSplitterSpec() -
FileSplitterSpec
protected FileSplitterSpec(boolean iterator) -
FileSplitterSpec
protected FileSplitterSpec(boolean iterator, boolean markers)
-
-
Method Details
-
charset
Set the charset to be used when reading the file, when something other than the default charset is required.- Parameters:
charset
- the charset.- Returns:
- the FileSplitterSpec
-
charset
Set the charset to be used when reading the file, when something other than the default charset is required.- Parameters:
charset
- the charset.- Returns:
- the FileSplitterSpec
-
markers
- Returns:
- the FileSplitterSpec
-
markers
Specify ifFileSplitter
should emitFileSplitter.FileMarker
s and if they should be converted to the JSON string representation. Defaults tofalse
for markers andfalse
for markersJson.- Parameters:
asJson
- the asJson flag to use.- Returns:
- the FileSplitterSpec
-
applySequence
Aboolean
flag to indicate ifsequenceDetails
should be applied for messages based on the lines from file. Defaults tofalse
.- Parameters:
applySequence
- the applySequence flag to use.- Returns:
- the FileSplitterSpec
- See Also:
AbstractMessageSplitter.setApplySequence(boolean)
-
firstLineAsHeader
Specify the header name for the first line to be carried as a header in the messages emitted for the remaining lines.- Parameters:
firstLineHeaderName
- the header name to carry first line.- Returns:
- the FileSplitterSpec
-
doGet
- Overrides:
doGet
in classIntegrationComponentSpec<FileSplitterSpec,FileSplitter>
-