Class NamedWriteableAwareStreamInput

org.elasticsearch.common.io.stream.StreamInput
org.elasticsearch.common.io.stream.FilterStreamInput
org.elasticsearch.common.io.stream.NamedWriteableAwareStreamInput
All Implemented Interfaces:
,

public class NamedWriteableAwareStreamInput extends FilterStreamInput
Wraps a StreamInput and associates it with a NamedWriteableRegistry
  • Constructor Details

  • Method Details

    • readNamedWriteable

      public <C extends <C> categoryClass) throws
      Description copied from class: StreamInput
      Reads a NamedWriteable from the current stream, by first reading its name and then looking for the corresponding entry in the registry by name, so that the proper object can be read and returned. Default implementation throws as StreamInput doesn't hold a registry. Use instead which wraps a stream and supports a NamedWriteableRegistry too.
      Overrides:
      readNamedWriteable in class StreamInput
      Throws:
    • readNamedWriteable

      public <C extends <C> categoryClass,  name) throws
      Description copied from class: StreamInput
      Reads a NamedWriteable from the current stream with the given name. It is assumed that the caller obtained the name from other source, so it's not read from the stream. The name is used for looking for the corresponding entry in the registry by name, so that the proper object can be read and returned. Default implementation throws as StreamInput doesn't hold a registry. Use instead which wraps a stream and supports a NamedWriteableRegistry too. Prefer StreamInput.readNamedWriteable(Class) and StreamOutput.writeNamedWriteable(NamedWriteable) unless you have a compelling reason to use this method instead.
      Overrides:
      readNamedWriteable in class StreamInput
      Throws:
    • namedWriteableRegistry

      public NamedWriteableRegistry namedWriteableRegistry()
      Description copied from class: StreamInput
      Get the registry of named writeables if this stream has one, null otherwise.
      Overrides:
      namedWriteableRegistry in class FilterStreamInput