Class FileSplitterSpec

java.lang.Object
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.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:
  • Field Summary

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

    logger, PARSER, target

    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
     
    protected
    FileSplitterSpec(boolean iterator)
     
    protected
    FileSplitterSpec(boolean iterator, boolean markers)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    applySequence(boolean applySequence)
    A boolean flag to indicate if sequenceDetails should be applied for messages based on the lines from file.
    charset(String charset)
    Set the charset to be used when reading the file, when something other than the default charset is required.
    charset(Charset charset)
    Set the charset to be used when reading the file, when something other than the default charset is required.
    protected FileSplitter
     
    firstLineAsHeader(String firstLineHeaderName)
    Specify the header name for the first line to be carried as a header in the messages emitted for the remaining lines.
    Specify if FileSplitter should emit FileSplitter.FileMarkers Defaults to false.
    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, afterPropertiesSet, destroy, getId, getObject, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stop

    Methods inherited from class java.lang.Object

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

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

    isSingleton
  • Constructor Details

    • FileSplitterSpec

      protected FileSplitterSpec()
    • FileSplitterSpec

      protected FileSplitterSpec(boolean iterator)
    • FileSplitterSpec

      protected FileSplitterSpec(boolean iterator, boolean markers)
  • Method Details

    • charset

      public FileSplitterSpec charset(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(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(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>