F
- the target file type.S
- the target RemoteFileOutboundGatewaySpec
implementation type.public abstract class RemoteFileOutboundGatewaySpec<F,S extends RemoteFileOutboundGatewaySpec<F,S>> extends MessageHandlerSpec<S,AbstractRemoteFileOutboundGateway<F>> implements ComponentsRegistration
MessageHandlerSpec
for the AbstractRemoteFileOutboundGateway
.logger, PARSER, target
Modifier | Constructor and Description |
---|---|
protected |
RemoteFileOutboundGatewaySpec(AbstractRemoteFileOutboundGateway<F> outboundGateway) |
Modifier and Type | Method and Description |
---|---|
S |
autoCreateLocalDirectory(boolean autoCreateLocalDirectory)
A
boolean flag to identify if local directory should be created automatically. |
S |
chmod(int chmod)
Set the file permissions after uploading, e.g.
|
S |
filter(FileListFilter<F> filter)
Set a
FileListFilter to filter remote files. |
S |
filterExpression(String expression)
Configure the
ExpressionFileListFilter . |
S |
filterFunction(java.util.function.Function<F,Boolean> filterFunction)
Configure the
ExpressionFileListFilter . |
Collection<Object> |
getComponentsToRegister() |
S |
localDirectory(File localDirectory)
Specify a directory path where remote files will be transferred to.
|
<P> S |
localDirectory(java.util.function.Function<Message<P>,String> localDirectoryFunction)
Specify a
Function to evaluate directory path where remote files will be transferred to. |
S |
localDirectoryExpression(Expression localDirectoryExpression)
Specify a SpEL expression to evaluate directory path where remote files will be transferred to.
|
S |
localDirectoryExpression(String localDirectoryExpression)
Specify a SpEL expression to evaluate directory path where remote files will be transferred to.
|
<P> S |
localFilename(java.util.function.Function<Message<P>,String> localFilenameFunction)
Specify a
Function for local files renaming after downloading. |
S |
localFilenameExpression(Expression localFilenameExpression)
Specify a SpEL expression for local files renaming after downloading.
|
S |
localFilenameExpression(String localFilenameExpression)
Specify a SpEL expression for local files renaming after downloading.
|
S |
mputFilter(FileListFilter<File> filter)
A
FileListFilter that runs against the local file system view when
using MPUT command. |
S |
mputFilterExpression(String expression)
Configure the
ExpressionFileListFilter . |
S |
mputFilterFunction(java.util.function.Function<File,Boolean> filterFunction)
Configure the
ExpressionFileListFilter . |
S |
options(AbstractRemoteFileOutboundGateway.Option... options)
Specify the array of
AbstractRemoteFileOutboundGateway.Option
for various gateway commands. |
S |
options(String options)
Specify the array of options for various gateway commands.
|
abstract S |
patternFileNameFilter(String pattern)
Specify a simple pattern to match remote files (e.g.
|
S |
patternMputFilter(String pattern)
A
SimplePatternFileListFilter that runs against the local file system view when
using MPUT command. |
abstract S |
regexFileNameFilter(String regex)
Specify a simple pattern to match remote files (e.g.
|
S |
regexMputFilter(String regex)
A
SimplePatternFileListFilter that runs against the local file system view when
using MPUT command. |
S |
remoteFileSeparator(String remoteFileSeparator)
Set the file separator when dealing with remote files; default '/'.
|
S |
renameExpression(Expression expression)
Specify a SpEL expression for files renaming during transfer.
|
S |
renameExpression(String expression)
Specify a SpEL expression for files renaming during transfer.
|
<P> S |
renameFunction(java.util.function.Function<Message<P>,String> renameFunction)
Specify a
Function for files renaming during transfer. |
S |
temporaryFileSuffix(String temporaryFileSuffix)
Set the temporary suffix to use when transferring files to the remote system.
|
_this, doGet, get, getId, getObject, getObjectType, id, isSingleton
protected RemoteFileOutboundGatewaySpec(AbstractRemoteFileOutboundGateway<F> outboundGateway)
public S options(String options)
options
- the options to set.options(AbstractRemoteFileOutboundGateway.Option...)
public S options(AbstractRemoteFileOutboundGateway.Option... options)
AbstractRemoteFileOutboundGateway.Option
for various gateway commands.options
- the options to set.public S remoteFileSeparator(String remoteFileSeparator)
remoteFileSeparator
- the separator.public S localDirectory(File localDirectory)
localDirectory
- the localDirectory to setpublic S localDirectoryExpression(String localDirectoryExpression)
localDirectoryExpression
- the SpEL to determine the local directory.public <P> S localDirectory(java.util.function.Function<Message<P>,String> localDirectoryFunction)
Function
to evaluate directory path where remote files will be transferred to.P
- the expected payload type.localDirectoryFunction
- the Function
to determine the local directory.public S localDirectoryExpression(Expression localDirectoryExpression)
localDirectoryExpression
- a SpEL expression to evaluate the local directory.public S autoCreateLocalDirectory(boolean autoCreateLocalDirectory)
boolean
flag to identify if local directory should be created automatically.
Defaults to true
.autoCreateLocalDirectory
- the autoCreateLocalDirectory to setpublic S temporaryFileSuffix(String temporaryFileSuffix)
.writing
.temporaryFileSuffix
- the temporaryFileSuffix to setpublic S filter(FileListFilter<F> filter)
FileListFilter
to filter remote files.filter
- the filter to setpublic S filterExpression(String expression)
ExpressionFileListFilter
.expression
- the SpEL expression for files filtering.FileReadingMessageSource.setFilter(FileListFilter)
,
ExpressionFileListFilter
public S filterFunction(java.util.function.Function<F,Boolean> filterFunction)
ExpressionFileListFilter
.filterFunction
- the Function
for files filtering.FileReadingMessageSource.setFilter(FileListFilter)
,
ExpressionFileListFilter
public S mputFilter(FileListFilter<File> filter)
FileListFilter
that runs against the local file system view when
using MPUT
command.filter
- the filter to setpublic S patternMputFilter(String pattern)
SimplePatternFileListFilter
that runs against the local file system view when
using MPUT
command.pattern
- the SimplePatternFileListFilter
for MPUT
command.public S regexMputFilter(String regex)
SimplePatternFileListFilter
that runs against the local file system view when
using MPUT
command.regex
- the SimplePatternFileListFilter
for MPUT
command.public S mputFilterExpression(String expression)
ExpressionFileListFilter
.expression
- the SpEL expression for files filtering.FileReadingMessageSource.setFilter(FileListFilter)
,
ExpressionFileListFilter
public S mputFilterFunction(java.util.function.Function<File,Boolean> filterFunction)
ExpressionFileListFilter
.filterFunction
- the Function
for files filtering.FileReadingMessageSource.setFilter(FileListFilter)
,
ExpressionFileListFilter
public S renameExpression(String expression)
expression
- the String in SpEL syntax.public S renameExpression(Expression expression)
expression
- the String in SpEL syntax.public <P> S renameFunction(java.util.function.Function<Message<P>,String> renameFunction)
Function
for files renaming during transfer.P
- the expected payload type.renameFunction
- the Function
to use.public S localFilenameExpression(String localFilenameExpression)
localFilenameExpression
- the SpEL expression to use.public <P> S localFilename(java.util.function.Function<Message<P>,String> localFilenameFunction)
Function
for local files renaming after downloading.P
- the expected payload type.localFilenameFunction
- the Function
to use.public S localFilenameExpression(Expression localFilenameExpression)
localFilenameExpression
- a SpEL expression to evaluate the local file name.public S chmod(int chmod)
chmod
- the permissions.public Collection<Object> getComponentsToRegister()
getComponentsToRegister
in interface ComponentsRegistration
public abstract S patternFileNameFilter(String pattern)
pattern
- the pattern.AbstractSimplePatternFileListFilter
,
filter(org.springframework.integration.file.filters.FileListFilter)
public abstract S regexFileNameFilter(String regex)
regex
- the regex pattern.AbstractRegexPatternFileListFilter
,
filter(org.springframework.integration.file.filters.FileListFilter)