Class RemoteFileStreamingInboundChannelAdapterSpec<F,​S extends RemoteFileStreamingInboundChannelAdapterSpec<F,​S,​MS>,​MS extends AbstractRemoteFileStreamingMessageSource<F>>

java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
org.springframework.integration.dsl.IntegrationComponentSpec<S,​H>
org.springframework.integration.dsl.MessageSourceSpec<S,​MS>
org.springframework.integration.file.dsl.RemoteFileStreamingInboundChannelAdapterSpec<F,​S,​MS>
Type Parameters:
F - the target file type.
S - the target RemoteFileStreamingInboundChannelAdapterSpec implementation type.
MS - the target AbstractRemoteFileStreamingMessageSource implementation type.
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean<MS>, org.springframework.beans.factory.InitializingBean, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle, org.springframework.integration.dsl.ComponentsRegistration

public abstract class RemoteFileStreamingInboundChannelAdapterSpec<F,​S extends RemoteFileStreamingInboundChannelAdapterSpec<F,​S,​MS>,​MS extends AbstractRemoteFileStreamingMessageSource<F>>
extends org.springframework.integration.dsl.MessageSourceSpec<S,​MS>
implements org.springframework.integration.dsl.ComponentsRegistration
A MessageSourceSpec for an AbstractRemoteFileStreamingMessageSource.
Since:
5.0
  • Field Summary

    Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec

    PARSER, target

    Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean

    logger

    Fields inherited from interface org.springframework.beans.factory.FactoryBean

    OBJECT_TYPE_ATTRIBUTE

    Fields inherited from interface org.springframework.context.SmartLifecycle

    DEFAULT_PHASE
  • Constructor Summary

    Constructors 
    Constructor Description
    RemoteFileStreamingInboundChannelAdapterSpec()  
  • Method Summary

    Modifier and Type Method Description
    S filter​(FileListFilter<F> filter)
    Configure a FileListFilter to be applied to the remote files before copying them.
    S filterExpression​(java.lang.String expression)
    S filterFunction​(java.util.function.Function<F,​java.lang.Boolean> filterFunction)
    java.util.Map<java.lang.Object,​java.lang.String> getComponentsToRegister()  
    S maxFetchSize​(int maxFetchSize)
    Specify the maximum number of remote files that will be fetched on each fetch attempt.
    abstract S patternFilter​(java.lang.String pattern)
    Configure a simple pattern filter (e.g.
    abstract S regexFilter​(java.lang.String regex)
    Configure a regex pattern filter (e.g.
    S remoteDirectory​(java.lang.String remoteDirectory)
    Specify the full path to the remote directory.
    S remoteDirectory​(java.util.function.Function<org.springframework.messaging.Message<?>,​java.lang.String> remoteDirectoryFunction)
    Specify a function that is invoked to determine the full path to the remote directory.
    S remoteDirectory​(org.springframework.expression.Expression remoteDirectoryExpression)
    Specify an expression that evaluates to the full path to the remote directory.
    S remoteFileSeparator​(java.lang.String remoteFileSeparator)
    Configure the file name path separator used by the remote system.

    Methods inherited from class org.springframework.integration.dsl.MessageSourceSpec

    messageHeaders

    Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec

    _this, createInstance, destroyInstance, doGet, get, getId, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stop

    Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean

    afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • remoteFileSeparator

      public S remoteFileSeparator​(java.lang.String remoteFileSeparator)
      Configure the file name path separator used by the remote system. Defaults to '/'.
      Parameters:
      remoteFileSeparator - the remoteFileSeparator.
      Returns:
      the spec.
    • remoteDirectory

      public S remoteDirectory​(java.lang.String remoteDirectory)
      Specify the full path to the remote directory.
      Parameters:
      remoteDirectory - the remoteDirectory.
      Returns:
      the spec.
      See Also:
      AbstractRemoteFileStreamingMessageSource.setRemoteDirectory(String)
    • remoteDirectory

      public S remoteDirectory​(org.springframework.expression.Expression remoteDirectoryExpression)
      Specify an expression that evaluates to the full path to the remote directory.
      Parameters:
      remoteDirectoryExpression - The remote directory expression.
      Returns:
      the spec.
    • remoteDirectory

      public S remoteDirectory​(java.util.function.Function<org.springframework.messaging.Message<?>,​java.lang.String> remoteDirectoryFunction)
      Specify a function that is invoked to determine the full path to the remote directory.
      Parameters:
      remoteDirectoryFunction - The remote directory function.
      Returns:
      the spec.
    • filter

      public S filter​(FileListFilter<F> filter)
      Configure a FileListFilter to be applied to the remote files before copying them.
      Parameters:
      filter - the filter.
      Returns:
      the spec.
    • filterExpression

      public S filterExpression​(java.lang.String expression)
      Parameters:
      expression - the SpEL expression for files filtering.
      Returns:
      the spec.
      See Also:
      AbstractRemoteFileStreamingMessageSource.setFilter(FileListFilter), ExpressionFileListFilter
    • filterFunction

      public S filterFunction​(java.util.function.Function<F,​java.lang.Boolean> filterFunction)
      Parameters:
      filterFunction - the Function for files filtering.
      Returns:
      the spec.
      See Also:
      AbstractRemoteFileStreamingMessageSource.setFilter(FileListFilter), ExpressionFileListFilter
    • maxFetchSize

      public S maxFetchSize​(int maxFetchSize)
      Specify the maximum number of remote files that will be fetched on each fetch attempt. A small number is recommended when multiple application instances are running, to avoid one instance from "grabbing" all the files.
      Parameters:
      maxFetchSize - the max fetch size.
      Returns:
      the spec.
      See Also:
      MessageSourceManagement.setMaxFetchSize(int)
    • getComponentsToRegister

      public java.util.Map<java.lang.Object,​java.lang.String> getComponentsToRegister()
      Specified by:
      getComponentsToRegister in interface org.springframework.integration.dsl.ComponentsRegistration
    • patternFilter

      public abstract S patternFilter​(java.lang.String pattern)
      Configure a simple pattern filter (e.g. '*.txt').
      Parameters:
      pattern - the pattern.
      Returns:
      the spec.
      See Also:
      filter(FileListFilter)
    • regexFilter

      public abstract S regexFilter​(java.lang.String regex)
      Configure a regex pattern filter (e.g. '[0-9].*.txt').
      Parameters:
      regex - the regex.
      Returns:
      the spec.
      See Also:
      filter(FileListFilter)