Class FileSplitterSpec

java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
org.springframework.integration.dsl.IntegrationComponentSpec<S,​H>
org.springframework.integration.dsl.MessageHandlerSpec<FileSplitterSpec,​FileSplitter>
org.springframework.integration.file.dsl.FileSplitterSpec
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<FileSplitter>, org.springframework.beans.factory.InitializingBean, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle

public class FileSplitterSpec
extends org.springframework.integration.dsl.MessageHandlerSpec<FileSplitterSpec,​FileSplitter>
The MessageHandlerSpec for the FileSplitter.
Since:
5.0
See Also:
FileSplitter
  • 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 
    Modifier Constructor Description
    protected FileSplitterSpec()  
    protected FileSplitterSpec​(boolean iterator)  
    protected FileSplitterSpec​(boolean iterator, boolean markers)  
  • Method Summary

    Modifier and Type Method Description
    FileSplitterSpec applySequence​(boolean applySequence)
    A boolean flag to indicate if sequenceDetails should be applied for messages based on the lines from file.
    FileSplitterSpec charset​(java.lang.String charset)
    Set the charset to be used when reading the file, when something other than the default charset is required.
    FileSplitterSpec charset​(java.nio.charset.Charset charset)
    Set the charset to be used when reading the file, when something other than the default charset is required.
    protected FileSplitter doGet()  
    FileSplitterSpec firstLineAsHeader​(java.lang.String firstLineHeaderName)
    Specify the header name for the first line to be carried as a header in the messages emitted for the remaining lines.
    FileSplitterSpec markers()
    Specify if FileSplitter should emit FileSplitter.FileMarkers Defaults to false.
    FileSplitterSpec markers​(boolean asJson)
    Specify if FileSplitter should emit FileSplitter.FileMarkers and if they should be converted to the JSON string representation.

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

    _this, createInstance, destroyInstance, 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

    • charset

      public FileSplitterSpec charset​(java.lang.String charset)
      Set the charset to be used when reading the file, when something other than the default charset is required.
      Parameters:
      charset - the charset.
      Returns:
      the FileSplitterSpec
    • charset

      public FileSplitterSpec charset​(java.nio.charset.Charset charset)
      Set the charset to be used when reading the file, when something other than the default charset is required.
      Parameters:
      charset - the charset.
      Returns:
      the FileSplitterSpec
    • markers

      public FileSplitterSpec markers()
      Specify if FileSplitter should emit FileSplitter.FileMarkers Defaults to false.
      Returns:
      the FileSplitterSpec
    • markers

      public FileSplitterSpec markers​(boolean asJson)
      Specify if FileSplitter should emit FileSplitter.FileMarkers and if they should be converted to the JSON string representation. Defaults to false for markers and false for markersJson.
      Parameters:
      asJson - the asJson flag to use.
      Returns:
      the FileSplitterSpec
    • applySequence

      public FileSplitterSpec applySequence​(boolean applySequence)
      A boolean flag to indicate if sequenceDetails should be applied for messages based on the lines from file. Defaults to false.
      Parameters:
      applySequence - the applySequence flag to use.
      Returns:
      the FileSplitterSpec
      See Also:
      AbstractMessageSplitter.setApplySequence(boolean)
    • firstLineAsHeader

      public FileSplitterSpec firstLineAsHeader​(java.lang.String firstLineHeaderName)
      Specify the header name for the first line to be carried as a header in the messages emitted for the remaining lines.
      Parameters:
      firstLineHeaderName - the header name to carry first line.
      Returns:
      the FileSplitterSpec
    • doGet

      protected FileSplitter doGet()
      Overrides:
      doGet in class org.springframework.integration.dsl.IntegrationComponentSpec<FileSplitterSpec,​FileSplitter>