Class FooterTypeEncoder

All Implemented Interfaces:
DescribedTypeEncoder<Footer>, TypeEncoder<Footer>

public final class FooterTypeEncoder extends AbstractDescribedMapTypeEncoder<Object,Object,Footer>
Encoder of AMQP Footer type values to a byte stream
  • Constructor Details

    • FooterTypeEncoder

      public FooterTypeEncoder()
  • Method Details

    • getTypeClass

      public Class<Footer> getTypeClass()
      Returns:
      the Class type that this encoder handles.
    • getDescriptorCode

      public UnsignedLong getDescriptorCode()
      Returns:
      the UnsignedLong value to use as the Descriptor for this type.
    • getDescriptorSymbol

      public Symbol getDescriptorSymbol()
      Returns:
      the Symbol value to use as the Descriptor for this type.
    • hasMap

      public boolean hasMap(Footer value)
      Description copied from class: AbstractDescribedMapTypeEncoder
      Returns false when the value to be encoded has no Map body and can be written as a Null body type instead of a Map type.
      Specified by:
      hasMap in class AbstractDescribedMapTypeEncoder<Object,Object,Footer>
      Parameters:
      value - the value which be encoded as a map type.
      Returns:
      true if the type to be encoded has a Map body, false otherwise.
    • getMapSize

      public int getMapSize(Footer value)
      Description copied from class: AbstractDescribedMapTypeEncoder
      Gets the number of elements that will result when this type is encoded into an AMQP Map type.
      Specified by:
      getMapSize in class AbstractDescribedMapTypeEncoder<Object,Object,Footer>
      Parameters:
      value - the value which will be encoded as a map type.
      Returns:
      the number of elements that should comprise the encoded list.
    • writeMapEntries

      public void writeMapEntries(ProtonBuffer buffer, Encoder encoder, EncoderState state, Footer footers)
      Description copied from class: AbstractDescribedMapTypeEncoder
      Performs the write of the Map entries to the given buffer, the caller takes care of writing the Map preamble and tracking the final size of the written elements of the Map.
      Specified by:
      writeMapEntries in class AbstractDescribedMapTypeEncoder<Object,Object,Footer>
      Parameters:
      buffer - the buffer where the type should be encoded to.
      encoder - the current encoder.
      state - the current encoder state.
      footers - the value which will be encoded as a map type.