Class SftpStreamingMessageSource
java.lang.Object
org.springframework.integration.util.AbstractExpressionEvaluator
org.springframework.integration.endpoint.AbstractMessageSource<InputStream>
org.springframework.integration.endpoint.AbstractFetchLimitingMessageSource<InputStream>
org.springframework.integration.file.remote.AbstractRemoteFileStreamingMessageSource<org.apache.sshd.sftp.client.SftpClient.DirEntry>
org.springframework.integration.sftp.inbound.SftpStreamingMessageSource
- All Implemented Interfaces:
Aware, BeanFactoryAware, BeanNameAware, DisposableBean, InitializingBean, Lifecycle, MessageSource<InputStream>, IntegrationPattern, NamedComponent, IntegrationInboundManagement, IntegrationManagement, ManageableLifecycle, MessageSourceManagement
public class SftpStreamingMessageSource
extends AbstractRemoteFileStreamingMessageSource<org.apache.sshd.sftp.client.SftpClient.DirEntry>
Message source for streaming SFTP remote file contents.
- Since:
- 4.3
- Author:
- Gary Russell, Artem Bilan
-
Nested Class Summary
Nested classes/interfaces inherited from interface IntegrationManagement
IntegrationManagement.ManagementOverrides -
Field Summary
Fields inherited from class AbstractExpressionEvaluator
EXPRESSION_PARSER, loggerFields inherited from interface IntegrationManagement
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME -
Constructor Summary
ConstructorsConstructorDescriptionSftpStreamingMessageSource(RemoteFileTemplate<org.apache.sshd.sftp.client.SftpClient.DirEntry> template) Construct an instance with the supplied template.SftpStreamingMessageSource(RemoteFileTemplate<org.apache.sshd.sftp.client.SftpClient.DirEntry> template, @Nullable Comparator<org.apache.sshd.sftp.client.SftpClient.DirEntry> comparator) Construct an instance with the supplied template and comparator. -
Method Summary
Modifier and TypeMethodDescriptionprotected List<AbstractFileInfo<org.apache.sshd.sftp.client.SftpClient.DirEntry>> asFileInfoList(Collection<org.apache.sshd.sftp.client.SftpClient.DirEntry> files) protected booleanisDirectory(org.apache.sshd.sftp.client.SftpClient.DirEntry file) Methods inherited from class AbstractRemoteFileStreamingMessageSource
clearFetchedCache, doInit, doReceive, doSetFilter, getRemoteFileTemplate, isRunning, onInit, poll, remotePath, rollbackFromFileToListEnd, setFileInfoJson, setFilter, setRemoteDirectory, setRemoteDirectoryExpression, setRemoteFileSeparator, setStrictOrder, start, stopMethods inherited from class AbstractFetchLimitingMessageSource
doReceive, getMaxFetchSize, setMaxFetchSizeMethods inherited from class AbstractMessageSource
buildMessage, destroy, getComponentName, getManagedName, getManagedType, getOverrides, isLoggingEnabled, receive, registerMetricsCaptor, setBeanName, setHeaderExpressions, setLoggingEnabled, setManagedName, setManagedTypeMethods inherited from class AbstractExpressionEvaluator
afterPropertiesSet, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, getBeanFactory, getEvaluationContext, getEvaluationContext, getMessageBuilderFactory, setBeanFactory, setConversionService, setSimpleEvaluationContextMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IntegrationManagement
getThisAs, isObserved, registerObservationRegistryMethods inherited from interface MessageSource
getIntegrationPatternTypeMethods inherited from interface NamedComponent
getBeanName
-
Constructor Details
-
SftpStreamingMessageSource
public SftpStreamingMessageSource(RemoteFileTemplate<org.apache.sshd.sftp.client.SftpClient.DirEntry> template) Construct an instance with the supplied template.- Parameters:
template- the template.
-
SftpStreamingMessageSource
public SftpStreamingMessageSource(RemoteFileTemplate<org.apache.sshd.sftp.client.SftpClient.DirEntry> template, @Nullable Comparator<org.apache.sshd.sftp.client.SftpClient.DirEntry> comparator) Construct an instance with the supplied template and comparator. Note: the comparator is applied each time the remote directory is listed which only occurs when the previous list is exhausted.- Parameters:
template- the template.comparator- the comparator.
-
-
Method Details
-
getComponentType
-
asFileInfoList
protected List<AbstractFileInfo<org.apache.sshd.sftp.client.SftpClient.DirEntry>> asFileInfoList(Collection<org.apache.sshd.sftp.client.SftpClient.DirEntry> files) - Specified by:
asFileInfoListin classAbstractRemoteFileStreamingMessageSource<org.apache.sshd.sftp.client.SftpClient.DirEntry>
-
isDirectory
protected boolean isDirectory(org.apache.sshd.sftp.client.SftpClient.DirEntry file) - Specified by:
isDirectoryin classAbstractRemoteFileStreamingMessageSource<org.apache.sshd.sftp.client.SftpClient.DirEntry>
-