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
,SmbStreamingInboundChannelAdapterSpec
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
Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
logger
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfilter
(FileListFilter<F> filter) Configure aFileListFilter
to be applied to the remote files before copying them.filterExpression
(String expression) Configure theExpressionFileListFilter
.filterFunction
(Function<F, Boolean> filterFunction) Configure theExpressionFileListFilter
.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.remoteDirectory
(String remoteDirectory) Specify the full path to the remote directory.remoteDirectory
(Function<Message<?>, String> remoteDirectoryFunction) Specify a function that is invoked to determine the full path to the remote directory.remoteDirectory
(Expression remoteDirectoryExpression) Specify an expression that evaluates to the full path to the remote directory.remoteFileSeparator
(String remoteFileSeparator) Configure the file name path separator used by the remote system.Methods inherited from class org.springframework.integration.dsl.MessageSourceSpec
messageHeaders
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:
-
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:
-
filterFunction
Configure theExpressionFileListFilter
.- Parameters:
filterFunction
- theFunction
for files filtering.- Returns:
- the spec.
- See Also:
-
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:
-
getComponentsToRegister
- Specified by:
getComponentsToRegister
in interfaceComponentsRegistration
-
patternFilter
Configure a simple pattern filter (e.g. '*.txt').- Parameters:
pattern
- the pattern.- Returns:
- the spec.
- See Also:
-
regexFilter
Configure a regex pattern filter (e.g. '[0-9].*.txt').- Parameters:
regex
- the regex.- Returns:
- the spec.
- See Also:
-