Class FileSplitterSpec

All Implemented Interfaces:
DisposableBean, FactoryBean<FileSplitter>, InitializingBean, Lifecycle, Phased, SmartLifecycle

public class FileSplitterSpec extends MessageHandlerSpec<FileSplitterSpec,FileSplitter>
Since:
5.0
Author:
Artem Bilan
See Also:
  • 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:
    • 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 IntegrationComponentSpec<FileSplitterSpec,FileSplitter>