Class RemoteFileOutboundGatewaySpec<F,S extends RemoteFileOutboundGatewaySpec<F,S>>
java.lang.Object
org.springframework.integration.dsl.IntegrationComponentSpec<S,H>
org.springframework.integration.dsl.MessageHandlerSpec<S,AbstractRemoteFileOutboundGateway<F>>
org.springframework.integration.file.dsl.RemoteFileOutboundGatewaySpec<F,S>
- Type Parameters:
F- the target file type.S- the targetRemoteFileOutboundGatewaySpecimplementation type.
- All Implemented Interfaces:
DisposableBean,FactoryBean<AbstractRemoteFileOutboundGateway<F>>,InitializingBean,Lifecycle,Phased,SmartLifecycle,ComponentsRegistration
- Direct Known Subclasses:
FtpOutboundGatewaySpec,SftpOutboundGatewaySpec,SmbOutboundGatewaySpec
public abstract class RemoteFileOutboundGatewaySpec<F,S extends RemoteFileOutboundGatewaySpec<F,S>>
extends MessageHandlerSpec<S,AbstractRemoteFileOutboundGateway<F>>
implements ComponentsRegistration
The
MessageHandlerSpec for the AbstractRemoteFileOutboundGateway.- Since:
- 5.0
- Author:
- Artem Bilan, Gary Russell
-
Field Summary
Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
logger, PARSER, targetFields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTEFields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRemoteFileOutboundGatewaySpec(AbstractRemoteFileOutboundGateway<F> outboundGateway) -
Method Summary
Modifier and TypeMethodDescriptionautoCreateDirectory(boolean autoCreateDirectory) Determine whether the remote directory should automatically be created when sending files to the remote system.autoCreateLocalDirectory(boolean autoCreateLocalDirectory) Abooleanflag to identify if local directory should be created automatically.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.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.fileNameExpression(String fileNameExpression) Set the file name expression to determine the full path to the remote file.fileNameExpression(Expression fileNameExpression) Set the file name expression to determine the full path to the remote file.<P> SfileNameFunction(Function<Message<P>, String> fileNameFunction) Set the file name function to determine the full path to the remote file.fileNameGenerator(FileNameGenerator fileNameGenerator) Set the file name generator used to generate the remote filename to be used when transferring files to the remote system.filter(FileListFilter<F> filter) Set aFileListFilterto filter remote files.filterExpression(String expression) Configure theExpressionFileListFilter.filterFunction(Function<F, Boolean> filterFunction) Configure theExpressionFileListFilter.localDirectory(File localDirectory) Specify a directory path where remote files will be transferred to.<P> SlocalDirectory(Function<Message<P>, String> localDirectoryFunction) Specify aFunctionto evaluate directory path where remote files will be transferred to.localDirectoryExpression(String localDirectoryExpression) Specify a SpEL expression to evaluate directory path where remote files will be transferred to.localDirectoryExpression(Expression localDirectoryExpression) Specify a SpEL expression to evaluate directory path where remote files will be transferred to.localFilenameExpression(String localFilenameExpression) Specify a SpEL expression for local files renaming after downloading.localFilenameExpression(Expression localFilenameExpression) Specify a SpEL expression for local files renaming after downloading.<P> SlocalFilenameFunction(Function<Message<P>, String> localFilenameFunction) Specify aFunctionfor local files renaming after downloading.mputFilter(FileListFilter<File> filter) AFileListFilterthat runs against the local file system view when usingMPUTcommand.mputFilterExpression(String expression) Configure theExpressionFileListFilter.mputFilterFunction(Function<File, Boolean> filterFunction) Configure theExpressionFileListFilter.Specify the array of options for various gateway commands.options(AbstractRemoteFileOutboundGateway.Option... options) Specify the array ofAbstractRemoteFileOutboundGateway.Optionfor various gateway commands.abstract SpatternFileNameFilter(String pattern) Specify a simple pattern to match remote files (e.g.patternMputFilter(String pattern) ASimplePatternFileListFilterthat runs against the local file system view when usingMPUTcommand.abstract SregexFileNameFilter(String regex) Specify a simple pattern to match remote files (e.g.regexMputFilter(String regex) ASimplePatternFileListFilterthat runs against the local file system view when usingMPUTcommand.remoteDirectoryExpression(String remoteDirectoryExpression) Set the remote directory expression used to determine the remote directory to which files will be sent.remoteDirectoryExpression(Expression remoteDirectoryExpression) Set the remote directory expression used to determine the remote directory to which files will be sent.<P> SremoteDirectoryFunction(Function<Message<P>, String> remoteDirectoryFunction) Specify aFunctionfor remote directory.remoteFileSeparator(String remoteFileSeparator) Set the file separator when dealing with remote files; default '/'.renameExpression(String expression) Specify a SpEL expression for files renaming during transfer.renameExpression(Expression expression) Specify a SpEL expression for files renaming during transfer.<P> SrenameFunction(Function<Message<P>, String> renameFunction) Specify aFunctionfor files renaming during transfer.temporaryFileSuffix(String temporaryFileSuffix) Set the temporary suffix to use when transferring files to the remote system.temporaryRemoteDirectoryExpression(String temporaryRemoteDirectoryExpression) Set a temporary remote directory expression; used when transferring files to the remote system.temporaryRemoteDirectoryExpression(Expression temporaryRemoteDirectoryExpression) Set a temporary remote directory expression; used when transferring files to the remote system.<P> StemporaryRemoteDirectoryFunction(Function<Message<P>, String> temporaryRemoteDirectoryFunction) Set a temporary remote directory function; used when transferring files to the remote system.useTemporaryFileName(boolean useTemporaryFileName) Set whether a temporary file name is used when sending files to the remote system.Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, afterPropertiesSet, destroy, doGet, getId, getObject, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.beans.factory.FactoryBean
isSingleton
-
Constructor Details
-
RemoteFileOutboundGatewaySpec
-
-
Method Details
-
options
Specify the array of options for various gateway commands.- Parameters:
options- the options to set.- Returns:
- the spec
- See Also:
-
options
Specify the array ofAbstractRemoteFileOutboundGateway.Optionfor various gateway commands.- Parameters:
options- the options to set.- Returns:
- the spec
-
remoteFileSeparator
Set the file separator when dealing with remote files; default '/'.- Parameters:
remoteFileSeparator- the separator.- Returns:
- the spec
-
localDirectory
Specify a directory path where remote files will be transferred to.- Parameters:
localDirectory- the localDirectory to set- Returns:
- the spec
-
localDirectoryExpression
Specify a SpEL expression to evaluate directory path where remote files will be transferred to.- Parameters:
localDirectoryExpression- the SpEL to determine the local directory.- Returns:
- the spec
-
localDirectory
Specify aFunctionto evaluate directory path where remote files will be transferred to.- Type Parameters:
P- the expected payload type.- Parameters:
localDirectoryFunction- theFunctionto determine the local directory.- Returns:
- the spec
-
localDirectoryExpression
Specify a SpEL expression to evaluate directory path where remote files will be transferred to.- Parameters:
localDirectoryExpression- a SpEL expression to evaluate the local directory.- Returns:
- the Spec.
-
autoCreateLocalDirectory
Abooleanflag to identify if local directory should be created automatically. Defaults totrue.- Parameters:
autoCreateLocalDirectory- the autoCreateLocalDirectory to set- Returns:
- the Spec.
-
temporaryFileSuffix
Set the temporary suffix to use when transferring files to the remote system. Default.writing.- Parameters:
temporaryFileSuffix- the temporaryFileSuffix to set- Returns:
- the Spec.
-
filter
Set aFileListFilterto filter remote files.- Parameters:
filter- the filter to set- Returns:
- the Spec.
-
filterExpression
Configure theExpressionFileListFilter.- Parameters:
expression- the SpEL expression for files filtering.- Returns:
- the spec.
- See Also:
-
filterFunction
Configure theExpressionFileListFilter.- Parameters:
filterFunction- theFunctionfor files filtering.- Returns:
- the spec.
- See Also:
-
mputFilter
AFileListFilterthat runs against the local file system view when usingMPUTcommand.- Parameters:
filter- the filter to set- Returns:
- the Spec.
-
patternMputFilter
ASimplePatternFileListFilterthat runs against the local file system view when usingMPUTcommand.- Parameters:
pattern- theSimplePatternFileListFilterforMPUTcommand.- Returns:
- the Spec.
-
regexMputFilter
ASimplePatternFileListFilterthat runs against the local file system view when usingMPUTcommand.- Parameters:
regex- theSimplePatternFileListFilterforMPUTcommand.- Returns:
- the Spec.
-
mputFilterExpression
Configure theExpressionFileListFilter.- Parameters:
expression- the SpEL expression for files filtering.- Returns:
- the spec.
- See Also:
-
mputFilterFunction
Configure theExpressionFileListFilter.- Parameters:
filterFunction- theFunctionfor files filtering.- Returns:
- the spec.
- See Also:
-
renameExpression
Specify a SpEL expression for files renaming during transfer.- Parameters:
expression- the String in SpEL syntax.- Returns:
- the Spec.
-
renameExpression
Specify a SpEL expression for files renaming during transfer.- Parameters:
expression- the String in SpEL syntax.- Returns:
- the Spec.
-
renameFunction
Specify aFunctionfor files renaming during transfer.- Type Parameters:
P- the expected payload type.- Parameters:
renameFunction- theFunctionto use.- Returns:
- the Spec.
-
localFilenameExpression
Specify a SpEL expression for local files renaming after downloading.- Parameters:
localFilenameExpression- the SpEL expression to use.- Returns:
- the Spec.
-
localFilenameFunction
Specify aFunctionfor local files renaming after downloading.- Type Parameters:
P- the expected payload type.- Parameters:
localFilenameFunction- theFunctionto use.- Returns:
- the Spec.
- Since:
- 5.2
-
localFilenameExpression
Specify a SpEL expression for local files renaming after downloading.- Parameters:
localFilenameExpression- a SpEL expression to evaluate the local file name.- Returns:
- the Spec.
-
chmod
Set the file permissions after uploading, e.g. 0600 for owner read/write.- Parameters:
chmod- the permissions.- Returns:
- the current Spec
-
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.- Parameters:
fileExistsMode- the fileExistsMode to set.- Returns:
- the current Spec
-
autoCreateDirectory
Determine whether the remote directory should automatically be created when sending files to the remote system.- Parameters:
autoCreateDirectory- true to create the directory.- Returns:
- the current Spec
- Since:
- 5.2
- See Also:
-
remoteDirectoryExpression
Set the remote directory expression used to determine the remote directory to which files will be sent.- Parameters:
remoteDirectoryExpression- the remote directory expression.- Returns:
- the current Spec
- Since:
- 5.2
- See Also:
-
remoteDirectoryFunction
Specify aFunctionfor remote directory.- Type Parameters:
P- the expected payload type.- Parameters:
remoteDirectoryFunction- theFunctionto use.- Returns:
- the Spec.
- Since:
- 5.2
- See Also:
-
remoteDirectoryExpression
Set the remote directory expression used to determine the remote directory to which files will be sent.- Parameters:
remoteDirectoryExpression- the remote directory expression.- Returns:
- the current Spec
- Since:
- 5.2
- See Also:
-
temporaryRemoteDirectoryExpression
Set a temporary remote directory expression; used when transferring files to the remote system.- Parameters:
temporaryRemoteDirectoryExpression- the temporary remote directory expression.- Returns:
- the current Spec
- Since:
- 5.2
- See Also:
-
temporaryRemoteDirectoryFunction
public <P> S temporaryRemoteDirectoryFunction(Function<Message<P>, String> temporaryRemoteDirectoryFunction) Set a temporary remote directory function; used when transferring files to the remote system.- Type Parameters:
P- the expected payload type.- Parameters:
temporaryRemoteDirectoryFunction- the file name expression.- Returns:
- the current Spec
- Since:
- 5.2
- See Also:
-
temporaryRemoteDirectoryExpression
Set a temporary remote directory expression; used when transferring files to the remote system.- Parameters:
temporaryRemoteDirectoryExpression- the temporary remote directory expression.- Returns:
- the current Spec
- Since:
- 5.2
- See Also:
-
fileNameExpression
Set the file name expression to determine the full path to the remote file.- Parameters:
fileNameExpression- the file name expression.- Returns:
- the current Spec
- Since:
- 5.2
- See Also:
-
fileNameFunction
Set the file name function to determine the full path to the remote file.- Type Parameters:
P- the expected payload type.- Parameters:
fileNameFunction- the file name expression.- Returns:
- the current Spec
- Since:
- 5.2
- See Also:
-
fileNameExpression
Set the file name expression to determine the full path to the remote file.- Parameters:
fileNameExpression- the file name expression.- Returns:
- the current Spec
- Since:
- 5.2
- See Also:
-
useTemporaryFileName
Set whether a temporary file name is used when sending files to the remote system.- Parameters:
useTemporaryFileName- true to use a temporary file name.- Returns:
- the current Spec
- Since:
- 5.2
- See Also:
-
fileNameGenerator
Set the file name generator used to generate the remote filename to be used when transferring files to the remote system.- Parameters:
fileNameGenerator- the file name generator.- Returns:
- the current Spec
- Since:
- 5.2
- See Also:
-
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
- Since:
- 5.2
- See Also:
-
getComponentsToRegister
- Specified by:
getComponentsToRegisterin interfaceComponentsRegistration
-
patternFileNameFilter
Specify a simple pattern to match remote files (e.g. '*.txt').- Parameters:
pattern- the pattern.- Returns:
- the spec.
- See Also:
-
regexFileNameFilter
Specify a simple pattern to match remote files (e.g. '[0-9].*.txt').- Parameters:
regex- the regex pattern.- Returns:
- the spec.
- See Also:
-