Class SftpStreamingMessageSource

java.lang.Object
org.springframework.integration.util.AbstractExpressionEvaluator
org.springframework.integration.endpoint.AbstractMessageSource<T>
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:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.Lifecycle, org.springframework.integration.core.MessageSource<InputStream>, org.springframework.integration.IntegrationPattern, org.springframework.integration.support.context.NamedComponent, org.springframework.integration.support.management.IntegrationInboundManagement, org.springframework.integration.support.management.IntegrationManagement, org.springframework.integration.support.management.ManageableLifecycle, org.springframework.integration.support.management.MessageSourceManagement

public class SftpStreamingMessageSource extends org.springframework.integration.file.remote.AbstractRemoteFileStreamingMessageSource<org.apache.sshd.sftp.client.SftpClient.DirEntry>
Message source for streaming SFTP remote file contents.
Since:
4.3
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.springframework.integration.support.management.IntegrationManagement

    org.springframework.integration.support.management.IntegrationManagement.ManagementOverrides
  • Field Summary

    Fields inherited from class org.springframework.integration.util.AbstractExpressionEvaluator

    EXPRESSION_PARSER, logger

    Fields inherited from interface org.springframework.integration.support.management.IntegrationManagement

    METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME
  • Constructor Summary

    Constructors
    Constructor
    Description
    SftpStreamingMessageSource(org.springframework.integration.file.remote.RemoteFileTemplate<org.apache.sshd.sftp.client.SftpClient.DirEntry> template)
    Construct an instance with the supplied template.
    SftpStreamingMessageSource(org.springframework.integration.file.remote.RemoteFileTemplate<org.apache.sshd.sftp.client.SftpClient.DirEntry> template, Comparator<org.apache.sshd.sftp.client.SftpClient.DirEntry> comparator)
    Construct an instance with the supplied template and comparator.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected List<org.springframework.integration.file.remote.AbstractFileInfo<org.apache.sshd.sftp.client.SftpClient.DirEntry>>
    asFileInfoList(Collection<org.apache.sshd.sftp.client.SftpClient.DirEntry> files)
     
     
    protected boolean
    isDirectory(org.apache.sshd.sftp.client.SftpClient.DirEntry file)
     

    Methods inherited from class org.springframework.integration.file.remote.AbstractRemoteFileStreamingMessageSource

    doInit, doReceive, doSetFilter, getRemoteFileTemplate, isRunning, onInit, poll, remotePath, rollbackFromFileToListEnd, setFileInfoJson, setFilter, setRemoteDirectory, setRemoteDirectoryExpression, setRemoteFileSeparator, setStrictOrder, start, stop

    Methods inherited from class org.springframework.integration.endpoint.AbstractFetchLimitingMessageSource

    doReceive, getMaxFetchSize, setMaxFetchSize

    Methods inherited from class org.springframework.integration.endpoint.AbstractMessageSource

    buildMessage, destroy, getBeanName, getComponentName, getManagedName, getManagedType, getOverrides, isLoggingEnabled, receive, registerMetricsCaptor, setBeanName, setHeaderExpressions, setLoggingEnabled, setManagedName, setManagedType

    Methods inherited from class org.springframework.integration.util.AbstractExpressionEvaluator

    afterPropertiesSet, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, getBeanFactory, getEvaluationContext, getEvaluationContext, getMessageBuilderFactory, setBeanFactory, setConversionService

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.springframework.integration.support.management.IntegrationManagement

    getThisAs, isObserved, registerObservationRegistry

    Methods inherited from interface org.springframework.integration.core.MessageSource

    getIntegrationPatternType
  • Constructor Details

    • SftpStreamingMessageSource

      public SftpStreamingMessageSource(org.springframework.integration.file.remote.RemoteFileTemplate<org.apache.sshd.sftp.client.SftpClient.DirEntry> template)
      Construct an instance with the supplied template.
      Parameters:
      template - the template.
    • SftpStreamingMessageSource

      public SftpStreamingMessageSource(org.springframework.integration.file.remote.RemoteFileTemplate<org.apache.sshd.sftp.client.SftpClient.DirEntry> template, 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

      public String getComponentType()
    • asFileInfoList

      protected List<org.springframework.integration.file.remote.AbstractFileInfo<org.apache.sshd.sftp.client.SftpClient.DirEntry>> asFileInfoList(Collection<org.apache.sshd.sftp.client.SftpClient.DirEntry> files)
      Specified by:
      asFileInfoList in class org.springframework.integration.file.remote.AbstractRemoteFileStreamingMessageSource<org.apache.sshd.sftp.client.SftpClient.DirEntry>
    • isDirectory

      protected boolean isDirectory(org.apache.sshd.sftp.client.SftpClient.DirEntry file)
      Specified by:
      isDirectory in class org.springframework.integration.file.remote.AbstractRemoteFileStreamingMessageSource<org.apache.sshd.sftp.client.SftpClient.DirEntry>