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 targetRemoteFileStreamingInboundChannelAdapterSpecimplementation type.MS- the targetAbstractRemoteFileStreamingMessageSourceimplementation type.
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanClassLoaderAware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.FactoryBean<MS>,org.springframework.beans.factory.InitializingBean,org.springframework.context.Lifecycle,org.springframework.context.Phased,org.springframework.context.SmartLifecycle,org.springframework.integration.dsl.ComponentsRegistration
public abstract class RemoteFileStreamingInboundChannelAdapterSpec<F,S extends RemoteFileStreamingInboundChannelAdapterSpec<F,S,MS>,MS extends AbstractRemoteFileStreamingMessageSource<F>>
extends org.springframework.integration.dsl.MessageSourceSpec<S,MS>
implements org.springframework.integration.dsl.ComponentsRegistration
A
MessageSourceSpec for an AbstractRemoteFileStreamingMessageSource.- Since:
- 5.0
-
Field Summary
-
Constructor Summary
Constructors Constructor Description RemoteFileStreamingInboundChannelAdapterSpec() -
Method Summary
Modifier and Type Method Description Sfilter(FileListFilter<F> filter)Configure aFileListFilterto be applied to the remote files before copying them.SfilterExpression(java.lang.String expression)Configure theExpressionFileListFilter.SfilterFunction(java.util.function.Function<F,java.lang.Boolean> filterFunction)Configure theExpressionFileListFilter.java.util.Map<java.lang.Object,java.lang.String>getComponentsToRegister()SmaxFetchSize(int maxFetchSize)Specify the maximum number of remote files that will be fetched on each fetch attempt.abstract SpatternFilter(java.lang.String pattern)Configure a simple pattern filter (e.g.abstract SregexFilter(java.lang.String regex)Configure a regex pattern filter (e.g.SremoteDirectory(java.lang.String remoteDirectory)Specify the full path to the remote directory.SremoteDirectory(java.util.function.Function<org.springframework.messaging.Message<?>,java.lang.String> remoteDirectoryFunction)Specify a function that is invoked to determine the full path to the remote directory.SremoteDirectory(org.springframework.expression.Expression remoteDirectoryExpression)Specify an expression that evaluates to the full path to the remote directory.SremoteFileSeparator(java.lang.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
-
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
public S remoteDirectory(java.util.function.Function<org.springframework.messaging.Message<?>,java.lang.String> remoteDirectoryFunction)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 aFileListFilterto 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- theFunctionfor 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
public java.util.Map<java.lang.Object,java.lang.String> getComponentsToRegister()- Specified by:
getComponentsToRegisterin interfaceorg.springframework.integration.dsl.ComponentsRegistration
-
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)
-