F - the target file type.S - the target RemoteFileInboundChannelAdapterSpec implementation type.MS - the target AbstractInboundFileSynchronizingMessageSource implementation type.public abstract class RemoteFileInboundChannelAdapterSpec<F,S extends RemoteFileInboundChannelAdapterSpec<F,S,MS>,MS extends AbstractInboundFileSynchronizingMessageSource<F>> extends MessageSourceSpec<S,MS> implements ComponentsRegistration
| Modifier and Type | Field and Description |
|---|---|
protected AbstractInboundFileSynchronizer<F> |
synchronizer |
PARSER, targetloggerDEFAULT_PHASEOBJECT_TYPE_ATTRIBUTE| Modifier | Constructor and Description |
|---|---|
protected |
RemoteFileInboundChannelAdapterSpec(AbstractInboundFileSynchronizer<F> synchronizer) |
| Modifier and Type | Method and Description |
|---|---|
S |
autoCreateLocalDirectory(boolean autoCreateLocalDirectory)
Configure whether the local directory should be created by the adapter.
|
S |
deleteRemoteFiles(boolean deleteRemoteFiles)
Set to true to enable deletion of remote files after successful transfer.
|
S |
filter(FileListFilter<F> filter)
Configure a
FileListFilter to be applied to the remote files before
copying them. |
S |
filterExpression(String expression)
Configure the
ExpressionFileListFilter. |
S |
filterFunction(java.util.function.Function<F,Boolean> filterFunction)
Configure the
ExpressionFileListFilter. |
Map<Object,String> |
getComponentsToRegister() |
S |
localDirectory(File localDirectory)
Configure the local directory to copy files to.
|
S |
localFilename(java.util.function.Function<String,String> localFilenameFunction)
Configure a
Function to be invoked to generate the local file name;
argument passed to the apply method is the remote file name. |
S |
localFilenameExpression(Expression localFilenameExpression)
Configure a SpEL expression to generate the local file name; the root object for
the evaluation is the remote file name.
|
S |
localFilenameExpression(String localFilenameExpression)
Configure a SpEL expression to generate the local file name; the root object for
the evaluation is the remote file name.
|
S |
localFilter(FileListFilter<File> localFileListFilter)
A
FileListFilter used to determine which files will generate messages
after they have been synchronized. |
S |
maxFetchSize(int maxFetchSize)
Specify the maximum number of remote files that will be fetched on each fetch
attempt.
|
S |
metadataStorePrefix(String metadataStorePrefix)
Configure a prefix for remote files metadata keys.
|
abstract S |
patternFilter(String pattern)
Configure a simple pattern filter (e.g.
|
S |
preserveTimestamp(boolean preserveTimestamp)
Set to true to enable the preservation of the remote file timestamp when transferring.
|
abstract S |
regexFilter(String regex)
Configure a regex pattern filter (e.g.
|
S |
remoteComparator(Comparator<F> remoteComparator)
Set a comparator to sort the retrieved list of
F (the Type that represents
the remote file) prior to applying filters and max fetch size. |
S |
remoteDirectory(String remoteDirectory)
Specify the full path to the remote directory.
|
S |
remoteDirectoryExpression(Expression remoteDirectoryExpression)
Specify an expression that evaluates to the full path to the remote directory.
|
S |
remoteFileMetadataStore(MetadataStore remoteFileMetadataStore)
Configure a
MetadataStore for remote files metadata. |
S |
remoteFileSeparator(String remoteFileSeparator)
Configure the file name path separator used by the remote system.
|
S |
scanner(DirectoryScanner scanner)
Configure a scanner to use for the file system scan after transfer.
|
S |
temporaryFileSuffix(String temporaryFileSuffix)
Configure a suffix to temporarily apply to the local filename; when copied the
file is renamed to its final name.
|
messageHeaders_this, createInstance, destroyInstance, doGet, get, getId, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stopafterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingletonprotected final AbstractInboundFileSynchronizer<F> synchronizer
protected RemoteFileInboundChannelAdapterSpec(AbstractInboundFileSynchronizer<F> synchronizer)
public S autoCreateLocalDirectory(boolean autoCreateLocalDirectory)
autoCreateLocalDirectory - the autoCreateLocalDirectorypublic S localDirectory(File localDirectory)
localDirectory - the localDirectory.public S localFilter(FileListFilter<File> localFileListFilter)
FileListFilter used to determine which files will generate messages
after they have been synchronized.localFileListFilter - the localFileListFilter.AbstractInboundFileSynchronizingMessageSource.setLocalFilter(FileListFilter)public S remoteFileSeparator(String remoteFileSeparator)
remoteFileSeparator - the remoteFileSeparator.public S localFilenameExpression(String localFilenameExpression)
localFilenameExpression - the localFilenameExpression.public S localFilename(java.util.function.Function<String,String> localFilenameFunction)
Function to be invoked to generate the local file name;
argument passed to the apply method is the remote file name.localFilenameFunction - the localFilenameFunction.FunctionExpressionpublic S localFilenameExpression(Expression localFilenameExpression)
localFilenameExpression - the localFilenameExpression.public S temporaryFileSuffix(String temporaryFileSuffix)
temporaryFileSuffix - the temporaryFileSuffix.public S remoteDirectory(String remoteDirectory)
remoteDirectory - the remoteDirectory.AbstractInboundFileSynchronizer.setRemoteDirectory(String)public S remoteDirectoryExpression(Expression remoteDirectoryExpression)
remoteDirectoryExpression - The remote directory expression.public S filter(FileListFilter<F> filter)
FileListFilter to be applied to the remote files before
copying them.filter - the filter.public S filterExpression(String expression)
ExpressionFileListFilter.expression - the SpEL expression for files filtering.FileReadingMessageSource.setFilter(FileListFilter),
ExpressionFileListFilterpublic S filterFunction(java.util.function.Function<F,Boolean> filterFunction)
ExpressionFileListFilter.filterFunction - the Function for files filtering.FileReadingMessageSource.setFilter(FileListFilter),
ExpressionFileListFilterpublic abstract S patternFilter(String pattern)
pattern - the pattern.filter(FileListFilter)public abstract S regexFilter(String regex)
regex - the regex.filter(FileListFilter)public S deleteRemoteFiles(boolean deleteRemoteFiles)
deleteRemoteFiles - true to delete.public S preserveTimestamp(boolean preserveTimestamp)
preserveTimestamp - true to preserve.public S maxFetchSize(int maxFetchSize)
maxFetchSize - the max fetch size.MessageSourceManagement.setMaxFetchSize(int)public S remoteFileMetadataStore(MetadataStore remoteFileMetadataStore)
MetadataStore for remote files metadata.remoteFileMetadataStore - the MetadataStore to use.AbstractInboundFileSynchronizer.setRemoteFileMetadataStore(MetadataStore)public S metadataStorePrefix(String metadataStorePrefix)
metadataStorePrefix - the metadata key prefix to use.remoteFileMetadataStore(org.springframework.integration.metadata.MetadataStore)public S scanner(DirectoryScanner scanner)
scanner - the scanner.public S remoteComparator(Comparator<F> remoteComparator)
F (the Type that represents
the remote file) prior to applying filters and max fetch size.remoteComparator - the Comparator for remote files.public Map<Object,String> getComponentsToRegister()
getComponentsToRegister in interface ComponentsRegistration