Class FileTransferringMessageHandlerSpec<F,S extends FileTransferringMessageHandlerSpec<F,S>>
java.lang.Object
org.springframework.integration.dsl.IntegrationComponentSpec<S,H>
org.springframework.integration.dsl.MessageHandlerSpec<S,FileTransferringMessageHandler<F>>
org.springframework.integration.file.dsl.FileTransferringMessageHandlerSpec<F,S>
- Type Parameters:
F
- the target file type.S
- the targetFileTransferringMessageHandlerSpec
implementation type.
- All Implemented Interfaces:
DisposableBean
,FactoryBean<FileTransferringMessageHandler<F>>
,InitializingBean
,Lifecycle
,Phased
,SmartLifecycle
,ComponentsRegistration
- Direct Known Subclasses:
FtpMessageHandlerSpec
,SftpMessageHandlerSpec
,SmbMessageHandlerSpec
public abstract class FileTransferringMessageHandlerSpec<F,S extends FileTransferringMessageHandlerSpec<F,S>>
extends MessageHandlerSpec<S,FileTransferringMessageHandler<F>>
implements ComponentsRegistration
The
MessageHandlerSpec
for the FileTransferringMessageHandler
.- Since:
- 5.0
- Author:
- Artem Bilan, Joaquin Santana
-
Field Summary
Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
logger, PARSER, target
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE
-
Constructor Summary
ModifierConstructorDescriptionprotected
protected
FileTransferringMessageHandlerSpec
(RemoteFileTemplate<F> remoteFileTemplate) protected
FileTransferringMessageHandlerSpec
(RemoteFileTemplate<F> remoteFileTemplate, FileExistsMode fileExistsMode) protected
FileTransferringMessageHandlerSpec
(SessionFactory<F> sessionFactory) -
Method Summary
Modifier and TypeMethodDescriptionautoCreateDirectory
(boolean autoCreateDirectory) Aboolean
flag to indicate automatically create the directory or not.Set the charset to use when converting String payloads to bytes as the content of the remote file.Set the charset to use when converting String payloads to bytes as the content of the remote file.chmod
(int chmod) Set the file permissions after uploading, e.g.fileNameExpression
(String fileNameGeneratorExpression) Set theDefaultFileNameGenerator
based on the provided SpEL expression.fileNameGenerator
(FileNameGenerator fileNameGenerator) Set the file name generator used to generate the remote filename to be used when transferring files to the remote system.remoteDirectory
(String remoteDirectory) Specify a remote directory path.<P> S
remoteDirectory
(Function<Message<P>, String> remoteDirectoryFunction) Specify a remote directory pathFunction
.remoteDirectoryExpression
(String remoteDirectoryExpression) Specify a remote directory path SpEL expression.remoteFileSeparator
(String remoteFileSeparator) Specify a remote file separator symbol.temporaryFileSuffix
(String temporaryFileSuffix) Set the temporary suffix to use when transferring files to the remote system.temporaryRemoteDirectory
(String temporaryRemoteDirectory) Specify a remote directory path.<P> S
temporaryRemoteDirectory
(Function<Message<P>, String> temporaryRemoteDirectoryFunction) Specify a remote temporary directory pathFunction
.temporaryRemoteDirectoryExpression
(String temporaryRemoteDirectoryExpression) Specify a remote directory path SpEL expression.useTemporaryFileName
(boolean useTemporaryFileName) Aboolean
flag to use temporary files names or not.Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, afterPropertiesSet, destroy, doGet, get, getId, getObject, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stop
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.beans.factory.FactoryBean
isSingleton
-
Constructor Details
-
FileTransferringMessageHandlerSpec
protected FileTransferringMessageHandlerSpec() -
FileTransferringMessageHandlerSpec
-
FileTransferringMessageHandlerSpec
-
FileTransferringMessageHandlerSpec
protected FileTransferringMessageHandlerSpec(RemoteFileTemplate<F> remoteFileTemplate, FileExistsMode fileExistsMode)
-
-
Method Details
-
autoCreateDirectory
Aboolean
flag to indicate automatically create the directory or not.- Parameters:
autoCreateDirectory
- true to automatically create the directory.- Returns:
- the current Spec
-
remoteFileSeparator
Specify a remote file separator symbol.- Parameters:
remoteFileSeparator
- the remote file separator.- Returns:
- the current Spec
-
remoteDirectory
Specify a remote directory path.- Parameters:
remoteDirectory
- the remote directory path.- Returns:
- the current Spec
-
remoteDirectoryExpression
Specify a remote directory path SpEL expression.- Parameters:
remoteDirectoryExpression
- the remote directory expression- Returns:
- the current Spec
-
remoteDirectory
Specify a remote directory pathFunction
.- Type Parameters:
P
- the expected payload type.- Parameters:
remoteDirectoryFunction
- the remote directoryFunction
- Returns:
- the current Spec
-
temporaryRemoteDirectory
Specify a remote directory path.- Parameters:
temporaryRemoteDirectory
- the temporary remote directory path- Returns:
- the current Spec
-
temporaryRemoteDirectoryExpression
Specify a remote directory path SpEL expression.- Parameters:
temporaryRemoteDirectoryExpression
- the temporary remote directory path SpEL expression- Returns:
- the current Spec
-
temporaryRemoteDirectory
Specify a remote temporary directory pathFunction
.- Type Parameters:
P
- the expected payload type.- Parameters:
temporaryRemoteDirectoryFunction
- the temporary remote directoryFunction
- Returns:
- the current Spec
-
useTemporaryFileName
Aboolean
flag to use temporary files names or not. Defaults totrue
.- Parameters:
useTemporaryFileName
- true to use a temporary file name.- Returns:
- the current Spec
-
fileNameGenerator
Set the file name generator used to generate the remote filename to be used when transferring files to the remote system. DefaultDefaultFileNameGenerator
.- Parameters:
fileNameGenerator
- the file name generator.- Returns:
- the current Spec
-
fileNameExpression
Set theDefaultFileNameGenerator
based on the provided SpEL expression.- Parameters:
fileNameGeneratorExpression
- the SpEL expression for file names generation.- Returns:
- the current Spec
-
charset
Set the charset to use when converting String payloads to bytes as the content of the remote file. DefaultUTF-8
.- Parameters:
charset
- the charset.- Returns:
- the current Spec
-
charset
Set the charset to use when converting String payloads to bytes as the content of the remote file. DefaultUTF-8
.- Parameters:
charset
- the charset.- Returns:
- the current Spec
-
temporaryFileSuffix
Set the temporary suffix to use when transferring files to the remote system. Default ".writing".- Parameters:
temporaryFileSuffix
- the suffix- Returns:
- the current Spec
-
chmod
Set the file permissions after uploading, e.g. 0600 for owner read/write.- Parameters:
chmod
- the permissions.- Returns:
- the current Spec
-
getComponentsToRegister
- Specified by:
getComponentsToRegister
in interfaceComponentsRegistration
-