F
- the target file type.S
- the target RemoteFileInboundChannelAdapterSpec
implementation type.MS
- the target AbstractInboundFileSynchronizingMessageSource
implementation type.public abstract class RemoteFileInboundChannelAdapterSpec<F,S extends RemoteFileInboundChannelAdapterSpec<F,S,MS>,MS extends AbstractInboundFileSynchronizingMessageSource<F>>
extends org.springframework.integration.dsl.MessageSourceSpec<S,MS>
implements org.springframework.integration.dsl.ComponentsRegistration
MessageSourceSpec
for an AbstractInboundFileSynchronizingMessageSource
.Modifier and Type | Field and Description |
---|---|
protected AbstractInboundFileSynchronizer<F> |
synchronizer |
Modifier | Constructor and Description |
---|---|
protected |
RemoteFileInboundChannelAdapterSpec(AbstractInboundFileSynchronizer<F> synchronizer) |
Modifier and Type | Method and Description |
---|---|
S |
autoCreateLocalDirectory(boolean autoCreateLocalDirectory)
Configure whether the local directory should be created by the adapter.
|
S |
deleteRemoteFiles(boolean deleteRemoteFiles)
Set to true to enable deletion of remote files after successful transfer.
|
S |
filter(FileListFilter<F> filter)
Configure a
FileListFilter to be applied to the remote files before
copying them. |
S |
filterExpression(java.lang.String expression)
Configure the
ExpressionFileListFilter . |
S |
filterFunction(java.util.function.Function<F,java.lang.Boolean> filterFunction)
Configure the
ExpressionFileListFilter . |
java.util.Map<java.lang.Object,java.lang.String> |
getComponentsToRegister() |
S |
localDirectory(java.io.File localDirectory)
Configure the local directory to copy files to.
|
S |
localFilename(java.util.function.Function<java.lang.String,java.lang.String> localFilenameFunction)
Configure a
Function to be invoked to generate the local file name;
argument passed to the apply method is the remote file name. |
S |
localFilenameExpression(org.springframework.expression.Expression localFilenameExpression)
Configure a SpEL expression to generate the local file name; the root object for
the evaluation is the remote file name.
|
S |
localFilenameExpression(java.lang.String localFilenameExpression)
Configure a SpEL expression to generate the local file name; the root object for
the evaluation is the remote file name.
|
S |
localFilter(FileListFilter<java.io.File> localFileListFilter)
A
FileListFilter used to determine which files will generate messages
after they have been synchronized. |
S |
maxFetchSize(int maxFetchSize)
Specify the maximum number of remote files that will be fetched on each fetch
attempt.
|
abstract S |
patternFilter(java.lang.String pattern)
Configure a simple pattern filter (e.g.
|
S |
preserveTimestamp(boolean preserveTimestamp)
Set to true to enable the preservation of the remote file timestamp when transferring.
|
abstract S |
regexFilter(java.lang.String regex)
Configure a regex pattern filter (e.g.
|
S |
remoteDirectory(java.lang.String remoteDirectory)
Specify the full path to the remote directory.
|
S |
remoteDirectoryExpression(org.springframework.expression.Expression remoteDirectoryExpression)
Specify an expression that evaluates to the full path to the remote directory.
|
S |
remoteFileSeparator(java.lang.String remoteFileSeparator)
Configure the file name path separator used by the remote system.
|
S |
temporaryFileSuffix(java.lang.String temporaryFileSuffix)
Configure a suffix to temporarily apply to the local filename; when copied the
file is renamed to its final name.
|
protected final AbstractInboundFileSynchronizer<F> synchronizer
protected RemoteFileInboundChannelAdapterSpec(AbstractInboundFileSynchronizer<F> synchronizer)
public S autoCreateLocalDirectory(boolean autoCreateLocalDirectory)
autoCreateLocalDirectory
- the autoCreateLocalDirectorypublic S localDirectory(java.io.File localDirectory)
localDirectory
- the localDirectory.public S localFilter(FileListFilter<java.io.File> localFileListFilter)
FileListFilter
used to determine which files will generate messages
after they have been synchronized.localFileListFilter
- the localFileListFilter.AbstractInboundFileSynchronizingMessageSource.setLocalFilter(FileListFilter)
public S remoteFileSeparator(java.lang.String remoteFileSeparator)
remoteFileSeparator
- the remoteFileSeparator.public S localFilenameExpression(java.lang.String localFilenameExpression)
localFilenameExpression
- the localFilenameExpression.public S localFilename(java.util.function.Function<java.lang.String,java.lang.String> localFilenameFunction)
Function
to be invoked to generate the local file name;
argument passed to the apply
method is the remote file name.localFilenameFunction
- the localFilenameFunction.FunctionExpression
public S localFilenameExpression(org.springframework.expression.Expression localFilenameExpression)
localFilenameExpression
- the localFilenameExpression.public S temporaryFileSuffix(java.lang.String temporaryFileSuffix)
temporaryFileSuffix
- the temporaryFileSuffix.public S remoteDirectory(java.lang.String remoteDirectory)
remoteDirectory
- the remoteDirectory.AbstractInboundFileSynchronizer.setRemoteDirectory(String)
public S remoteDirectoryExpression(org.springframework.expression.Expression remoteDirectoryExpression)
remoteDirectoryExpression
- The remote directory expression.public S filter(FileListFilter<F> filter)
FileListFilter
to be applied to the remote files before
copying them.filter
- the filter.public S filterExpression(java.lang.String expression)
ExpressionFileListFilter
.expression
- the SpEL expression for files filtering.FileReadingMessageSource.setFilter(FileListFilter)
,
ExpressionFileListFilter
public S filterFunction(java.util.function.Function<F,java.lang.Boolean> filterFunction)
ExpressionFileListFilter
.filterFunction
- the Function
for files filtering.FileReadingMessageSource.setFilter(FileListFilter)
,
ExpressionFileListFilter
public abstract S patternFilter(java.lang.String pattern)
pattern
- the pattern.filter(FileListFilter)
public abstract S regexFilter(java.lang.String regex)
regex
- the regex.filter(FileListFilter)
public S deleteRemoteFiles(boolean deleteRemoteFiles)
deleteRemoteFiles
- true to delete.public S preserveTimestamp(boolean preserveTimestamp)
preserveTimestamp
- true to preserve.public S maxFetchSize(int maxFetchSize)
maxFetchSize
- the max fetch size.MessageSourceManagement.setMaxFetchSize(int)
public java.util.Map<java.lang.Object,java.lang.String> getComponentsToRegister()
getComponentsToRegister
in interface org.springframework.integration.dsl.ComponentsRegistration