Class SectionEncoder

java.lang.Object
org.apache.qpid.protonj2.codec.SectionEncoder

public final class SectionEncoder extends Object
AMQP Section type specific encoder that uses any Encoder to cache the specific type encoders for various section types and use them directly instead of looking them up via calls to Encoder.writeObject(org.apache.qpid.protonj2.buffer.ProtonBuffer, EncoderState, Object)
  • Constructor Details

    • SectionEncoder

      public SectionEncoder(Encoder encoder)
  • Method Details

    • write

      public void write(ProtonBuffer buffer, Section<?> section)
      Writes the given section using the cached encoder for that section types
      Parameters:
      buffer - The buffer to write the encoding to
      section - The section to write using one of the cached encoders
    • write

      public void write(ProtonBuffer buffer, ApplicationProperties properties)
      Writes the given section using the cached encoder for that section types
      Parameters:
      buffer - The buffer to write the encoding to
      properties - The section to write using the cached encoder.
    • write

      public void write(ProtonBuffer buffer, MessageAnnotations annotations)
      Writes the given section using the cached encoder for that section types
      Parameters:
      buffer - The buffer to write the encoding to
      annotations - The section to write using the cached encoder.
    • write

      public void write(ProtonBuffer buffer, DeliveryAnnotations annotations)
      Writes the given section using the cached encoder for that section types
      Parameters:
      buffer - The buffer to write the encoding to
      annotations - The section to write using the cached encoder.
    • write

      public void write(ProtonBuffer buffer, Properties properties)
      Writes the given section using the cached encoder for that section types
      Parameters:
      buffer - The buffer to write the encoding to
      properties - The section to write using the cached encoder.
    • write

      public void write(ProtonBuffer buffer, Header header)
      Writes the given section using the cached encoder for that section types
      Parameters:
      buffer - The buffer to write the encoding to
      header - The section to write using the cached encoder.
    • write

      public void write(ProtonBuffer buffer, Footer footer)
      Writes the given section using the cached encoder for that section types
      Parameters:
      buffer - The buffer to write the encoding to
      footer - The section to write using the cached encoder.