Class RemoteFileStreamingInboundChannelAdapterSpec<F,S extends RemoteFileStreamingInboundChannelAdapterSpec<F,S,MS>,MS extends AbstractRemoteFileStreamingMessageSource<F>>
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
org.springframework.integration.dsl.IntegrationComponentSpec<S,H>
org.springframework.integration.dsl.MessageSourceSpec<S,MS>
org.springframework.integration.file.dsl.RemoteFileStreamingInboundChannelAdapterSpec<F,S,MS>
- Type Parameters:
F
- the target file type.S
- the targetRemoteFileStreamingInboundChannelAdapterSpec
implementation type.MS
- the targetAbstractRemoteFileStreamingMessageSource
implementation type.
- All Implemented Interfaces:
Aware
,BeanClassLoaderAware
,BeanFactoryAware
,DisposableBean
,FactoryBean<MS>
,InitializingBean
,Lifecycle
,Phased
,SmartLifecycle
,ComponentsRegistration
- Direct Known Subclasses:
FtpStreamingInboundChannelAdapterSpec
,SftpStreamingInboundChannelAdapterSpec
public abstract class RemoteFileStreamingInboundChannelAdapterSpec<F,S extends RemoteFileStreamingInboundChannelAdapterSpec<F,S,MS>,MS extends AbstractRemoteFileStreamingMessageSource<F>> extends MessageSourceSpec<S,MS> implements ComponentsRegistration
- Since:
- 5.0
- Author:
- Gary Russell
-
Field Summary
Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
PARSER, target
-
Constructor Summary
Constructors Constructor Description RemoteFileStreamingInboundChannelAdapterSpec()
-
Method Summary
Modifier and Type Method Description S
filter(FileListFilter<F> filter)
Configure aFileListFilter
to be applied to the remote files before copying them.S
filterExpression(String expression)
Configure theExpressionFileListFilter
.S
filterFunction(Function<F,Boolean> filterFunction)
Configure theExpressionFileListFilter
.Map<Object,String>
getComponentsToRegister()
S
maxFetchSize(int maxFetchSize)
Specify the maximum number of remote files that will be fetched on each fetch attempt.abstract S
patternFilter(String pattern)
Configure a simple pattern filter (e.g.abstract S
regexFilter(String regex)
Configure a regex pattern filter (e.g.S
remoteDirectory(String remoteDirectory)
Specify the full path to the remote directory.S
remoteDirectory(Function<Message<?>,String> remoteDirectoryFunction)
Specify a function that is invoked to determine the full path to the remote directory.S
remoteDirectory(Expression remoteDirectoryExpression)
Specify an expression that evaluates to the full path to the remote directory.S
remoteFileSeparator(String remoteFileSeparator)
Configure the file name path separator used by the remote system.Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, createInstance, destroyInstance, doGet, 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
-
RemoteFileStreamingInboundChannelAdapterSpec
public RemoteFileStreamingInboundChannelAdapterSpec()
-
-
Method Details
-
remoteFileSeparator
Configure the file name path separator used by the remote system. Defaults to '/'.- Parameters:
remoteFileSeparator
- the remoteFileSeparator.- Returns:
- the spec.
-
remoteDirectory
Specify the full path to the remote directory.- Parameters:
remoteDirectory
- the remoteDirectory.- Returns:
- the spec.
- See Also:
AbstractRemoteFileStreamingMessageSource.setRemoteDirectory(String)
-
remoteDirectory
Specify an expression that evaluates to the full path to the remote directory.- Parameters:
remoteDirectoryExpression
- The remote directory expression.- Returns:
- the spec.
-
remoteDirectory
Specify a function that is invoked to determine the full path to the remote directory.- Parameters:
remoteDirectoryFunction
- The remote directory function.- Returns:
- the spec.
-
filter
Configure aFileListFilter
to be applied to the remote files before copying them.- Parameters:
filter
- the filter.- Returns:
- the spec.
-
filterExpression
Configure theExpressionFileListFilter
.- Parameters:
expression
- the SpEL expression for files filtering.- Returns:
- the spec.
- See Also:
AbstractRemoteFileStreamingMessageSource.setFilter(FileListFilter)
,ExpressionFileListFilter
-
filterFunction
Configure theExpressionFileListFilter
.- Parameters:
filterFunction
- theFunction
for files filtering.- Returns:
- the spec.
- See Also:
AbstractRemoteFileStreamingMessageSource.setFilter(FileListFilter)
,ExpressionFileListFilter
-
maxFetchSize
Specify the maximum number of remote files that will be fetched on each fetch attempt. A small number is recommended when multiple application instances are running, to avoid one instance from "grabbing" all the files.- Parameters:
maxFetchSize
- the max fetch size.- Returns:
- the spec.
- See Also:
MessageSourceManagement.setMaxFetchSize(int)
-
getComponentsToRegister
- Specified by:
getComponentsToRegister
in interfaceComponentsRegistration
-
patternFilter
Configure a simple pattern filter (e.g. '*.txt').- Parameters:
pattern
- the pattern.- Returns:
- the spec.
- See Also:
filter(FileListFilter)
-
regexFilter
Configure a regex pattern filter (e.g. '[0-9].*.txt').- Parameters:
regex
- the regex.- Returns:
- the spec.
- See Also:
filter(FileListFilter)
-