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
.PARSER, target
logger
DEFAULT_PHASE
OBJECT_TYPE_ATTRIBUTE
Modifier | Constructor and Description |
---|---|
protected |
RemoteFileOutboundGatewaySpec(AbstractRemoteFileOutboundGateway<F> outboundGateway) |
Modifier and Type | Method and Description |
---|---|
S |
autoCreateDirectory(boolean autoCreateDirectory)
Determine whether the remote directory should automatically be created when
sending files to the remote system.
|
S |
autoCreateLocalDirectory(boolean autoCreateLocalDirectory)
A
boolean flag to identify if local directory should be created automatically. |
S |
charset(String charset)
Set the charset to use when converting String payloads to bytes as the content of the
remote file.
|
S |
chmod(int chmod)
Set the file permissions after uploading, e.g.
|
S |
fileExistsMode(FileExistsMode fileExistsMode)
Determine the action to take when using GET and MGET operations when the file
already exists locally, or PUT and MPUT when the file exists on the remote
system.
|
S |
fileNameExpression(Expression fileNameExpression)
Set the file name expression to determine the full path to the remote file.
|
S |
fileNameExpression(String fileNameExpression)
Set the file name expression to determine the full path to the remote file.
|
<P> S |
fileNameFunction(java.util.function.Function<Message<P>,String> fileNameFunction)
Set the file name function to determine the full path to the remote file.
|
S |
fileNameGenerator(FileNameGenerator fileNameGenerator)
Set the file name generator used to generate the remote filename to be used when transferring
files to the remote system.
|
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 . |
Map<Object,String> |
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.
|
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.
|
<P> S |
localFilenameFunction(java.util.function.Function<Message<P>,String> localFilenameFunction)
Specify a
Function 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 |
remoteDirectoryExpression(Expression remoteDirectoryExpression)
Set the remote directory expression used to determine the remote directory to which
files will be sent.
|
S |
remoteDirectoryExpression(String remoteDirectoryExpression)
Set the remote directory expression used to determine the remote directory to which
files will be sent.
|
<P> S |
remoteDirectoryFunction(java.util.function.Function<Message<P>,String> remoteDirectoryFunction)
Specify a
Function for remote directory. |
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.
|
S |
temporaryRemoteDirectoryExpression(Expression temporaryRemoteDirectoryExpression)
Set a temporary remote directory expression; used when transferring files to the remote
system.
|
S |
temporaryRemoteDirectoryExpression(String temporaryRemoteDirectoryExpression)
Set a temporary remote directory expression; used when transferring files to the remote
system.
|
<P> S |
temporaryRemoteDirectoryFunction(java.util.function.Function<Message<P>,String> temporaryRemoteDirectoryFunction)
Set a temporary remote directory function; used when transferring files to the remote
system.
|
S |
useTemporaryFileName(boolean useTemporaryFileName)
Set whether a temporary file name is used when sending files to the remote system.
|
_this, createInstance, destroyInstance, doGet, get, getId, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stop
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
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.AbstractRemoteFileOutboundGateway.setFilter(FileListFilter)
,
ExpressionFileListFilter
public S filterFunction(java.util.function.Function<F,Boolean> filterFunction)
ExpressionFileListFilter
.filterFunction
- the Function
for files filtering.AbstractRemoteFileOutboundGateway.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.AbstractRemoteFileOutboundGateway.setFilter(FileListFilter)
,
ExpressionFileListFilter
public S mputFilterFunction(java.util.function.Function<File,Boolean> filterFunction)
ExpressionFileListFilter
.filterFunction
- the Function
for files filtering.AbstractRemoteFileOutboundGateway.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 localFilenameFunction(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 S fileExistsMode(FileExistsMode fileExistsMode)
fileExistsMode
- the fileExistsMode to set.public S autoCreateDirectory(boolean autoCreateDirectory)
autoCreateDirectory
- true to create the directory.AbstractRemoteFileOutboundGateway.setAutoCreateDirectory(boolean)
public S remoteDirectoryExpression(String remoteDirectoryExpression)
remoteDirectoryExpression
- the remote directory expression.AbstractRemoteFileOutboundGateway.setRemoteDirectoryExpression(org.springframework.expression.Expression)
public <P> S remoteDirectoryFunction(java.util.function.Function<Message<P>,String> remoteDirectoryFunction)
Function
for remote directory.P
- the expected payload type.remoteDirectoryFunction
- the Function
to use.AbstractRemoteFileOutboundGateway.setRemoteDirectoryExpression(org.springframework.expression.Expression)
,
FunctionExpression
public S remoteDirectoryExpression(Expression remoteDirectoryExpression)
remoteDirectoryExpression
- the remote directory expression.AbstractRemoteFileOutboundGateway.setRemoteDirectoryExpression(org.springframework.expression.Expression)
public S temporaryRemoteDirectoryExpression(String temporaryRemoteDirectoryExpression)
temporaryRemoteDirectoryExpression
- the temporary remote directory expression.AbstractRemoteFileOutboundGateway.setRemoteDirectoryExpression(org.springframework.expression.Expression)
public <P> S temporaryRemoteDirectoryFunction(java.util.function.Function<Message<P>,String> temporaryRemoteDirectoryFunction)
P
- the expected payload type.temporaryRemoteDirectoryFunction
- the file name expression.AbstractRemoteFileOutboundGateway.setRemoteDirectoryExpression(org.springframework.expression.Expression)
public S temporaryRemoteDirectoryExpression(Expression temporaryRemoteDirectoryExpression)
temporaryRemoteDirectoryExpression
- the temporary remote directory expression.AbstractRemoteFileOutboundGateway.setRemoteDirectoryExpression(org.springframework.expression.Expression)
public S fileNameExpression(String fileNameExpression)
fileNameExpression
- the file name expression.AbstractRemoteFileOutboundGateway.setFileNameExpression(org.springframework.expression.Expression)
public <P> S fileNameFunction(java.util.function.Function<Message<P>,String> fileNameFunction)
P
- the expected payload type.fileNameFunction
- the file name expression.AbstractRemoteFileOutboundGateway.setFileNameExpression(org.springframework.expression.Expression)
public S fileNameExpression(Expression fileNameExpression)
fileNameExpression
- the file name expression.AbstractRemoteFileOutboundGateway.setFileNameExpression(org.springframework.expression.Expression)
public S useTemporaryFileName(boolean useTemporaryFileName)
useTemporaryFileName
- true to use a temporary file name.AbstractRemoteFileOutboundGateway.setUseTemporaryFileName(boolean)
public S fileNameGenerator(FileNameGenerator fileNameGenerator)
fileNameGenerator
- the file name generator.AbstractRemoteFileOutboundGateway.setFileNameGenerator(org.springframework.integration.file.FileNameGenerator)
public S charset(String charset)
UTF-8
.charset
- the charset.AbstractRemoteFileOutboundGateway.setCharset(java.lang.String)
public Map<Object,String> 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)