F - the target file type.S - the target FileTransferringMessageHandlerSpec implementation type.public abstract class FileTransferringMessageHandlerSpec<F,S extends FileTransferringMessageHandlerSpec<F,S>> extends org.springframework.integration.dsl.MessageHandlerSpec<S,FileTransferringMessageHandler<F>> implements org.springframework.integration.dsl.ComponentsRegistration
MessageHandlerSpec for the FileTransferringMessageHandler.| Modifier | Constructor and Description |
|---|---|
protected |
FileTransferringMessageHandlerSpec(RemoteFileTemplate<F> remoteFileTemplate) |
protected |
FileTransferringMessageHandlerSpec(RemoteFileTemplate<F> remoteFileTemplate,
FileExistsMode fileExistsMode) |
protected |
FileTransferringMessageHandlerSpec(SessionFactory<F> sessionFactory) |
| Modifier and Type | Method and Description |
|---|---|
S |
autoCreateDirectory(boolean autoCreateDirectory)
A
boolean flag to indicate automatically create the directory or not. |
S |
charset(java.nio.charset.Charset charset)
Set the charset to use when converting String payloads to bytes as the content of the
remote file.
|
S |
charset(java.lang.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 |
fileNameExpression(java.lang.String fileNameGeneratorExpression)
Set the
DefaultFileNameGenerator based on the provided SpEL expression. |
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.
|
java.util.Map<java.lang.Object,java.lang.String> |
getComponentsToRegister() |
<P> S |
remoteDirectory(java.util.function.Function<org.springframework.messaging.Message<P>,java.lang.String> remoteDirectoryFunction)
Specify a remote directory path
Function. |
S |
remoteDirectory(java.lang.String remoteDirectory)
Specify a remote directory path.
|
S |
remoteDirectoryExpression(java.lang.String remoteDirectoryExpression)
Specify a remote directory path SpEL expression.
|
S |
remoteFileSeparator(java.lang.String remoteFileSeparator)
Specify a remote file separator symbol.
|
S |
temporaryFileSuffix(java.lang.String temporaryFileSuffix)
Set the temporary suffix to use when transferring files to the remote system.
|
<P> S |
temporaryRemoteDirectory(java.util.function.Function<org.springframework.messaging.Message<P>,java.lang.String> temporaryRemoteDirectoryFunction)
Specify a remote temporary directory path
Function. |
S |
temporaryRemoteDirectory(java.lang.String temporaryRemoteDirectory)
Specify a remote directory path.
|
S |
temporaryRemoteDirectoryExpression(java.lang.String temporaryRemoteDirectoryExpression)
Specify a remote directory path SpEL expression.
|
S |
useTemporaryFileName(boolean useTemporaryFileName)
A
boolean flag to use temporary files names or not. |
protected FileTransferringMessageHandlerSpec(SessionFactory<F> sessionFactory)
protected FileTransferringMessageHandlerSpec(RemoteFileTemplate<F> remoteFileTemplate)
protected FileTransferringMessageHandlerSpec(RemoteFileTemplate<F> remoteFileTemplate, FileExistsMode fileExistsMode)
public S autoCreateDirectory(boolean autoCreateDirectory)
boolean flag to indicate automatically create the directory or not.autoCreateDirectory - true to automatically create the directory.public S remoteFileSeparator(java.lang.String remoteFileSeparator)
remoteFileSeparator - the remote file separator.public S remoteDirectory(java.lang.String remoteDirectory)
remoteDirectory - the remote directory path.public S remoteDirectoryExpression(java.lang.String remoteDirectoryExpression)
remoteDirectoryExpression - the remote directory expressionpublic <P> S remoteDirectory(java.util.function.Function<org.springframework.messaging.Message<P>,java.lang.String> remoteDirectoryFunction)
Function.P - the expected payload type.remoteDirectoryFunction - the remote directory Functionpublic S temporaryRemoteDirectory(java.lang.String temporaryRemoteDirectory)
temporaryRemoteDirectory - the temporary remote directory pathpublic S temporaryRemoteDirectoryExpression(java.lang.String temporaryRemoteDirectoryExpression)
temporaryRemoteDirectoryExpression - the temporary remote directory path SpEL expressionpublic <P> S temporaryRemoteDirectory(java.util.function.Function<org.springframework.messaging.Message<P>,java.lang.String> temporaryRemoteDirectoryFunction)
Function.P - the expected payload type.temporaryRemoteDirectoryFunction - the temporary remote directory Functionpublic S useTemporaryFileName(boolean useTemporaryFileName)
boolean flag to use temporary files names or not.
Defaults to true.useTemporaryFileName - true to use a temporary file name.public S fileNameGenerator(FileNameGenerator fileNameGenerator)
DefaultFileNameGenerator.fileNameGenerator - the file name generator.public S fileNameExpression(java.lang.String fileNameGeneratorExpression)
DefaultFileNameGenerator based on the provided SpEL expression.fileNameGeneratorExpression - the SpEL expression for file names generation.public S charset(java.lang.String charset)
UTF-8.charset - the charset.public S charset(java.nio.charset.Charset charset)
UTF-8.charset - the charset.public S temporaryFileSuffix(java.lang.String temporaryFileSuffix)
temporaryFileSuffix - the suffixpublic S chmod(int chmod)
chmod - the permissions.public java.util.Map<java.lang.Object,java.lang.String> getComponentsToRegister()
getComponentsToRegister in interface org.springframework.integration.dsl.ComponentsRegistration