F
- the target file type.S
- the target FileTransferringMessageHandlerSpec
implementation type.public abstract class FileTransferringMessageHandlerSpec<F,S extends FileTransferringMessageHandlerSpec<F,S>> extends MessageHandlerSpec<S,FileTransferringMessageHandler<F>> implements ComponentsRegistration
MessageHandlerSpec
for the FileTransferringMessageHandler
.PARSER, target
logger
DEFAULT_PHASE
OBJECT_TYPE_ATTRIBUTE
Modifier | Constructor and Description |
---|---|
protected |
FileTransferringMessageHandlerSpec() |
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(Charset charset)
Set the charset to use when converting String payloads to bytes as the content of the
remote file.
|
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 |
fileNameExpression(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.
|
Map<Object,String> |
getComponentsToRegister() |
<P> S |
remoteDirectory(java.util.function.Function<Message<P>,String> remoteDirectoryFunction)
Specify a remote directory path
Function . |
S |
remoteDirectory(String remoteDirectory)
Specify a remote directory path.
|
S |
remoteDirectoryExpression(String remoteDirectoryExpression)
Specify a remote directory path SpEL expression.
|
S |
remoteFileSeparator(String remoteFileSeparator)
Specify a remote file separator symbol.
|
S |
temporaryFileSuffix(String temporaryFileSuffix)
Set the temporary suffix to use when transferring files to the remote system.
|
<P> S |
temporaryRemoteDirectory(java.util.function.Function<Message<P>,String> temporaryRemoteDirectoryFunction)
Specify a remote temporary directory path
Function . |
S |
temporaryRemoteDirectory(String temporaryRemoteDirectory)
Specify a remote directory path.
|
S |
temporaryRemoteDirectoryExpression(String temporaryRemoteDirectoryExpression)
Specify a remote directory path SpEL expression.
|
S |
useTemporaryFileName(boolean useTemporaryFileName)
A
boolean flag to use temporary files names or not. |
_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 FileTransferringMessageHandlerSpec()
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(String remoteFileSeparator)
remoteFileSeparator
- the remote file separator.public S remoteDirectory(String remoteDirectory)
remoteDirectory
- the remote directory path.public S remoteDirectoryExpression(String remoteDirectoryExpression)
remoteDirectoryExpression
- the remote directory expressionpublic <P> S remoteDirectory(java.util.function.Function<Message<P>,String> remoteDirectoryFunction)
Function
.P
- the expected payload type.remoteDirectoryFunction
- the remote directory Function
public S temporaryRemoteDirectory(String temporaryRemoteDirectory)
temporaryRemoteDirectory
- the temporary remote directory pathpublic S temporaryRemoteDirectoryExpression(String temporaryRemoteDirectoryExpression)
temporaryRemoteDirectoryExpression
- the temporary remote directory path SpEL expressionpublic <P> S temporaryRemoteDirectory(java.util.function.Function<Message<P>,String> temporaryRemoteDirectoryFunction)
Function
.P
- the expected payload type.temporaryRemoteDirectoryFunction
- the temporary remote directory Function
public 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(String fileNameGeneratorExpression)
DefaultFileNameGenerator
based on the provided SpEL expression.fileNameGeneratorExpression
- the SpEL expression for file names generation.public S charset(String charset)
UTF-8
.charset
- the charset.public S charset(Charset charset)
UTF-8
.charset
- the charset.public S temporaryFileSuffix(String temporaryFileSuffix)
temporaryFileSuffix
- the suffixpublic S chmod(int chmod)
chmod
- the permissions.public Map<Object,String> getComponentsToRegister()
getComponentsToRegister
in interface ComponentsRegistration