Class JsonStreamingSplitter

  • All Implemented Interfaces:
    MessageSplitter

    @ComponentProfile(since="3.8.2")
    public class JsonStreamingSplitter
    extends MessageSplitterImp
    Splitter implementation that splits based on JSON streaming events.

    Note that this is only a pseudo-xpath evaluator as it only allows simple element traversal and not any XPath functions. /path/to/repeating/element would be fine, but //repeating/element would not. It works based on XMLEventReader and navigates based on StartElement events only.

    In the adapter configuration file this class is aliased as json-streaming-splitter which is the preferred alternative to the fully qualified classname when building your configuration.

    • Constructor Detail

      • JsonStreamingSplitter

        public JsonStreamingSplitter()
      • JsonStreamingSplitter

        public JsonStreamingSplitter​(java.lang.String path)
    • Method Detail

      • getBufferSize

        public java.lang.Integer getBufferSize()
      • setBufferSize

        public void setBufferSize​(java.lang.Integer b)
        Set the internal buffer size.

        This is used when; the default buffer size matches the default buffer size in BufferedReader and BufferedWriter , changes to the buffersize will impact performance and memory usage depending on the underlying operating system/disk.

        Parameters:
        b - the buffer size (default is 8192).
      • bufferSize

        protected int bufferSize()
      • getPath

        public java.lang.String getPath()
      • setWrapWithArray

        public void setWrapWithArray​(java.lang.Boolean wrapWithArray)
      • getWrapWithArray

        public java.lang.Boolean getWrapWithArray()
      • wrapWithArray

        protected boolean wrapWithArray()
      • getSuppressPathNotFound

        public java.lang.Boolean getSuppressPathNotFound()
      • setSuppressPathNotFound

        public void setSuppressPathNotFound​(java.lang.Boolean suppressPathNotFound)
      • setPath

        public void setPath​(java.lang.String path)
        Set the xpath-alike path to the element on which you want to split.

        Note that this is only a pseudo-xpath evaluator as it only allows simple element traversal and not any XPath functions. /path/to/repeating/element would be fine, but //repeating/element would not. It works based on XMLEventReader and navigates based on StartElement events only.

        Parameters:
        path - the path.