Class RemoteFileOutboundGatewaySpec<F,S extends RemoteFileOutboundGatewaySpec<F,S>>
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
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 target- RemoteFileOutboundGatewaySpecimplementation type.
- All Implemented Interfaces:
- Aware,- BeanClassLoaderAware,- BeanFactoryAware,- DisposableBean,- FactoryBean<AbstractRemoteFileOutboundGateway<F>>,- InitializingBean,- Lifecycle,- Phased,- SmartLifecycle,- ComponentsRegistration
- Direct Known Subclasses:
- FtpOutboundGatewaySpec,- SftpOutboundGatewaySpec
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 SummaryFields inherited from class org.springframework.integration.dsl.IntegrationComponentSpecPARSER, target
- 
Constructor SummaryConstructors Modifier Constructor Description protectedRemoteFileOutboundGatewaySpec(AbstractRemoteFileOutboundGateway<F> outboundGateway)
- 
Method SummaryModifier and Type Method Description SautoCreateDirectory(boolean autoCreateDirectory)Determine whether the remote directory should automatically be created when sending files to the remote system.SautoCreateLocalDirectory(boolean autoCreateLocalDirectory)Abooleanflag to identify if local directory should be created automatically.Scharset(String charset)Set the charset to use when converting String payloads to bytes as the content of the remote file.Schmod(int chmod)Set the file permissions after uploading, e.g.SfileExistsMode(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.SfileNameExpression(String fileNameExpression)Set the file name expression to determine the full path to the remote file.SfileNameExpression(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.SfileNameGenerator(FileNameGenerator fileNameGenerator)Set the file name generator used to generate the remote filename to be used when transferring files to the remote system.Sfilter(FileListFilter<F> filter)Set aFileListFilterto filter remote files.SfilterExpression(String expression)Configure theExpressionFileListFilter.SfilterFunction(Function<F,Boolean> filterFunction)Configure theExpressionFileListFilter.Map<Object,String>getComponentsToRegister()SlocalDirectory(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.SlocalDirectoryExpression(String localDirectoryExpression)Specify a SpEL expression to evaluate directory path where remote files will be transferred to.SlocalDirectoryExpression(Expression localDirectoryExpression)Specify a SpEL expression to evaluate directory path where remote files will be transferred to.SlocalFilenameExpression(String localFilenameExpression)Specify a SpEL expression for local files renaming after downloading.SlocalFilenameExpression(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.SmputFilter(FileListFilter<File> filter)AFileListFilterthat runs against the local file system view when usingMPUTcommand.SmputFilterExpression(String expression)Configure theExpressionFileListFilter.SmputFilterFunction(Function<File,Boolean> filterFunction)Configure theExpressionFileListFilter.Soptions(String options)Specify the array of options for various gateway commands.Soptions(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.SpatternMputFilter(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.SregexMputFilter(String regex)ASimplePatternFileListFilterthat runs against the local file system view when usingMPUTcommand.SremoteDirectoryExpression(String remoteDirectoryExpression)Set the remote directory expression used to determine the remote directory to which files will be sent.SremoteDirectoryExpression(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.SremoteFileSeparator(String remoteFileSeparator)Set the file separator when dealing with remote files; default '/'.SrenameExpression(String expression)Specify a SpEL expression for files renaming during transfer.SrenameExpression(Expression expression)Specify a SpEL expression for files renaming during transfer.<P> SrenameFunction(Function<Message<P>,String> renameFunction)Specify aFunctionfor files renaming during transfer.StemporaryFileSuffix(String temporaryFileSuffix)Set the temporary suffix to use when transferring files to the remote system.StemporaryRemoteDirectoryExpression(String temporaryRemoteDirectoryExpression)Set a temporary remote directory expression; used when transferring files to the remote system.StemporaryRemoteDirectoryExpression(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.SuseTemporaryFileName(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, createInstance, destroyInstance, doGet, get, getId, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stopMethods inherited from class org.springframework.beans.factory.config.AbstractFactoryBeanafterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
- 
Constructor Details
- 
Method Details- 
optionsSpecify the array of options for various gateway commands.- Parameters:
- options- the options to set.
- Returns:
- the spec
- See Also:
- options(AbstractRemoteFileOutboundGateway.Option...)
 
- 
optionsSpecify the array ofAbstractRemoteFileOutboundGateway.Optionfor various gateway commands.- Parameters:
- options- the options to set.
- Returns:
- the spec
 
- 
remoteFileSeparatorSet the file separator when dealing with remote files; default '/'.- Parameters:
- remoteFileSeparator- the separator.
- Returns:
- the spec
 
- 
localDirectorySpecify a directory path where remote files will be transferred to.- Parameters:
- localDirectory- the localDirectory to set
- Returns:
- the spec
 
- 
localDirectoryExpressionSpecify 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
 
- 
localDirectorySpecify aFunctionto evaluate directory path where remote files will be transferred to.- Type Parameters:
- P- the expected payload type.
- Parameters:
- localDirectoryFunction- the- Functionto determine the local directory.
- Returns:
- the spec
 
- 
localDirectoryExpressionSpecify 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.
 
- 
autoCreateLocalDirectoryAbooleanflag to identify if local directory should be created automatically. Defaults totrue.- Parameters:
- autoCreateLocalDirectory- the autoCreateLocalDirectory to set
- Returns:
- the Spec.
 
- 
temporaryFileSuffixSet the temporary suffix to use when transferring files to the remote system. Default.writing.- Parameters:
- temporaryFileSuffix- the temporaryFileSuffix to set
- Returns:
- the Spec.
 
- 
filterSet aFileListFilterto filter remote files.- Parameters:
- filter- the filter to set
- Returns:
- the Spec.
 
- 
filterExpressionConfigure theExpressionFileListFilter.- Parameters:
- expression- the SpEL expression for files filtering.
- Returns:
- the spec.
- See Also:
- AbstractRemoteFileOutboundGateway.setFilter(FileListFilter),- ExpressionFileListFilter
 
- 
filterFunctionConfigure theExpressionFileListFilter.- Parameters:
- filterFunction- the- Functionfor files filtering.
- Returns:
- the spec.
- See Also:
- AbstractRemoteFileOutboundGateway.setFilter(FileListFilter),- ExpressionFileListFilter
 
- 
mputFilterAFileListFilterthat runs against the local file system view when usingMPUTcommand.- Parameters:
- filter- the filter to set
- Returns:
- the Spec.
 
- 
patternMputFilterASimplePatternFileListFilterthat runs against the local file system view when usingMPUTcommand.- Parameters:
- pattern- the- SimplePatternFileListFilterfor- MPUTcommand.
- Returns:
- the Spec.
 
- 
regexMputFilterASimplePatternFileListFilterthat runs against the local file system view when usingMPUTcommand.- Parameters:
- regex- the- SimplePatternFileListFilterfor- MPUTcommand.
- Returns:
- the Spec.
 
- 
mputFilterExpressionConfigure theExpressionFileListFilter.- Parameters:
- expression- the SpEL expression for files filtering.
- Returns:
- the spec.
- See Also:
- AbstractRemoteFileOutboundGateway.setFilter(FileListFilter),- ExpressionFileListFilter
 
- 
mputFilterFunctionConfigure theExpressionFileListFilter.- Parameters:
- filterFunction- the- Functionfor files filtering.
- Returns:
- the spec.
- See Also:
- AbstractRemoteFileOutboundGateway.setFilter(FileListFilter),- ExpressionFileListFilter
 
- 
renameExpressionSpecify a SpEL expression for files renaming during transfer.- Parameters:
- expression- the String in SpEL syntax.
- Returns:
- the Spec.
 
- 
renameExpressionSpecify a SpEL expression for files renaming during transfer.- Parameters:
- expression- the String in SpEL syntax.
- Returns:
- the Spec.
 
- 
renameFunctionSpecify aFunctionfor files renaming during transfer.- Type Parameters:
- P- the expected payload type.
- Parameters:
- renameFunction- the- Functionto use.
- Returns:
- the Spec.
 
- 
localFilenameExpressionSpecify a SpEL expression for local files renaming after downloading.- Parameters:
- localFilenameExpression- the SpEL expression to use.
- Returns:
- the Spec.
 
- 
localFilenameFunctionSpecify aFunctionfor local files renaming after downloading.- Type Parameters:
- P- the expected payload type.
- Parameters:
- localFilenameFunction- the- Functionto use.
- Returns:
- the Spec.
- Since:
- 5.2
 
- 
localFilenameExpressionSpecify a SpEL expression for local files renaming after downloading.- Parameters:
- localFilenameExpression- a SpEL expression to evaluate the local file name.
- Returns:
- the Spec.
 
- 
chmodSet the file permissions after uploading, e.g. 0600 for owner read/write.- Parameters:
- chmod- the permissions.
- Returns:
- the current Spec
 
- 
fileExistsModeDetermine 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
 
- 
autoCreateDirectoryDetermine 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:
- AbstractRemoteFileOutboundGateway.setAutoCreateDirectory(boolean)
 
- 
remoteDirectoryExpressionSet 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:
- AbstractRemoteFileOutboundGateway.setRemoteDirectoryExpression(org.springframework.expression.Expression)
 
- 
remoteDirectoryFunctionSpecify aFunctionfor remote directory.- Type Parameters:
- P- the expected payload type.
- Parameters:
- remoteDirectoryFunction- the- Functionto use.
- Returns:
- the Spec.
- Since:
- 5.2
- See Also:
- AbstractRemoteFileOutboundGateway.setRemoteDirectoryExpression(org.springframework.expression.Expression),- FunctionExpression
 
- 
remoteDirectoryExpressionSet 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:
- AbstractRemoteFileOutboundGateway.setRemoteDirectoryExpression(org.springframework.expression.Expression)
 
- 
temporaryRemoteDirectoryExpressionSet 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:
- AbstractRemoteFileOutboundGateway.setRemoteDirectoryExpression(org.springframework.expression.Expression)
 
- 
temporaryRemoteDirectoryFunctionpublic <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:
- AbstractRemoteFileOutboundGateway.setRemoteDirectoryExpression(org.springframework.expression.Expression)
 
- 
temporaryRemoteDirectoryExpressionSet 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:
- AbstractRemoteFileOutboundGateway.setRemoteDirectoryExpression(org.springframework.expression.Expression)
 
- 
fileNameExpressionSet 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:
- AbstractRemoteFileOutboundGateway.setFileNameExpression(org.springframework.expression.Expression)
 
- 
fileNameFunctionSet 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:
- AbstractRemoteFileOutboundGateway.setFileNameExpression(org.springframework.expression.Expression)
 
- 
fileNameExpressionSet 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:
- AbstractRemoteFileOutboundGateway.setFileNameExpression(org.springframework.expression.Expression)
 
- 
useTemporaryFileNameSet 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:
- AbstractRemoteFileOutboundGateway.setUseTemporaryFileName(boolean)
 
- 
fileNameGeneratorSet 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:
- AbstractRemoteFileOutboundGateway.setFileNameGenerator(org.springframework.integration.file.FileNameGenerator)
 
- 
charsetSet 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:
- AbstractRemoteFileOutboundGateway.setCharset(java.lang.String)
 
- 
getComponentsToRegister- Specified by:
- getComponentsToRegisterin interface- ComponentsRegistration
 
- 
patternFileNameFilterSpecify a simple pattern to match remote files (e.g. '*.txt').- Parameters:
- pattern- the pattern.
- Returns:
- the spec.
- See Also:
- AbstractSimplePatternFileListFilter,- filter(org.springframework.integration.file.filters.FileListFilter)
 
- 
regexFileNameFilterSpecify a simple pattern to match remote files (e.g. '[0-9].*.txt').- Parameters:
- regex- the regex pattern.
- Returns:
- the spec.
- See Also:
- AbstractRegexPatternFileListFilter,- filter(org.springframework.integration.file.filters.FileListFilter)
 
 
-