Class ClientMessageSupport

java.lang.Object
org.apache.qpid.protonj2.client.impl.ClientMessageSupport

public abstract class ClientMessageSupport extends Object
Support methods dealing with Message types and encode or decode operations.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <E> AdvancedMessage<E>
    convertMessage(Message<E> message)
    Converts a Message instance into a ClientMessage instance either by cast or by construction of a new instance with a copy of the values carried in the given message.
    static <E> org.apache.qpid.protonj2.types.messaging.Section<E>
     
    static Message<?>
    decodeMessage(org.apache.qpid.protonj2.buffer.ProtonBuffer buffer, Consumer<org.apache.qpid.protonj2.types.messaging.DeliveryAnnotations> daConsumer)
     
    static Message<?>
    decodeMessage(org.apache.qpid.protonj2.codec.Decoder decoder, org.apache.qpid.protonj2.buffer.ProtonBuffer buffer, Consumer<org.apache.qpid.protonj2.types.messaging.DeliveryAnnotations> daConsumer)
     
    static Message<?>
    decodeMessage(org.apache.qpid.protonj2.codec.Decoder decoder, org.apache.qpid.protonj2.codec.DecoderState decoderState, org.apache.qpid.protonj2.buffer.ProtonBuffer buffer, Consumer<org.apache.qpid.protonj2.types.messaging.DeliveryAnnotations> daConsumer)
     
    static org.apache.qpid.protonj2.buffer.ProtonBuffer
    encodeMessage(AdvancedMessage<?> message, Map<String,Object> deliveryAnnotations)
     
    static org.apache.qpid.protonj2.buffer.ProtonBuffer
    encodeMessage(AdvancedMessage<?> message, Map<String,Object> deliveryAnnotations, org.apache.qpid.protonj2.buffer.ProtonBufferAllocator allocator)
     
    static org.apache.qpid.protonj2.buffer.ProtonBuffer
    encodeMessage(org.apache.qpid.protonj2.codec.Encoder encoder, org.apache.qpid.protonj2.buffer.ProtonBufferAllocator allocator, AdvancedMessage<?> message, Map<String,Object> deliveryAnnotations)
     
    static org.apache.qpid.protonj2.buffer.ProtonBuffer
    encodeMessage(org.apache.qpid.protonj2.codec.Encoder encoder, org.apache.qpid.protonj2.codec.EncoderState encoderState, org.apache.qpid.protonj2.buffer.ProtonBufferAllocator allocator, AdvancedMessage<?> message, Map<String,Object> deliveryAnnotations)
     
    static org.apache.qpid.protonj2.buffer.ProtonBuffer
    encodeSection(org.apache.qpid.protonj2.types.messaging.Section<?> section, org.apache.qpid.protonj2.buffer.ProtonBuffer buffer)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ClientMessageSupport

      public ClientMessageSupport()
  • Method Details

    • convertMessage

      public static <E> AdvancedMessage<E> convertMessage(Message<E> message) throws ClientException
      Converts a Message instance into a ClientMessage instance either by cast or by construction of a new instance with a copy of the values carried in the given message.
      Type Parameters:
      E - the body type of the given message.
      Parameters:
      message - The Message type to attempt to convert to a ClientMessage instance.
      Returns:
      a ClientMessage that represents the given Message instance.
      Throws:
      ClientException - if an unrecoverable error occurs during message conversion.
    • encodeSection

      public static org.apache.qpid.protonj2.buffer.ProtonBuffer encodeSection(org.apache.qpid.protonj2.types.messaging.Section<?> section, org.apache.qpid.protonj2.buffer.ProtonBuffer buffer)
    • encodeMessage

      public static org.apache.qpid.protonj2.buffer.ProtonBuffer encodeMessage(AdvancedMessage<?> message, Map<String,Object> deliveryAnnotations) throws ClientException
      Throws:
      ClientException
    • encodeMessage

      public static org.apache.qpid.protonj2.buffer.ProtonBuffer encodeMessage(AdvancedMessage<?> message, Map<String,Object> deliveryAnnotations, org.apache.qpid.protonj2.buffer.ProtonBufferAllocator allocator) throws ClientException
      Throws:
      ClientException
    • encodeMessage

      public static org.apache.qpid.protonj2.buffer.ProtonBuffer encodeMessage(org.apache.qpid.protonj2.codec.Encoder encoder, org.apache.qpid.protonj2.buffer.ProtonBufferAllocator allocator, AdvancedMessage<?> message, Map<String,Object> deliveryAnnotations) throws ClientException
      Throws:
      ClientException
    • encodeMessage

      public static org.apache.qpid.protonj2.buffer.ProtonBuffer encodeMessage(org.apache.qpid.protonj2.codec.Encoder encoder, org.apache.qpid.protonj2.codec.EncoderState encoderState, org.apache.qpid.protonj2.buffer.ProtonBufferAllocator allocator, AdvancedMessage<?> message, Map<String,Object> deliveryAnnotations) throws ClientException
      Throws:
      ClientException
    • decodeMessage

      public static Message<?> decodeMessage(org.apache.qpid.protonj2.buffer.ProtonBuffer buffer, Consumer<org.apache.qpid.protonj2.types.messaging.DeliveryAnnotations> daConsumer) throws ClientException
      Throws:
      ClientException
    • decodeMessage

      public static Message<?> decodeMessage(org.apache.qpid.protonj2.codec.Decoder decoder, org.apache.qpid.protonj2.buffer.ProtonBuffer buffer, Consumer<org.apache.qpid.protonj2.types.messaging.DeliveryAnnotations> daConsumer) throws ClientException
      Throws:
      ClientException
    • decodeMessage

      public static Message<?> decodeMessage(org.apache.qpid.protonj2.codec.Decoder decoder, org.apache.qpid.protonj2.codec.DecoderState decoderState, org.apache.qpid.protonj2.buffer.ProtonBuffer buffer, Consumer<org.apache.qpid.protonj2.types.messaging.DeliveryAnnotations> daConsumer) throws ClientException
      Throws:
      ClientException
    • createSectionFromValue

      public static <E> org.apache.qpid.protonj2.types.messaging.Section<E> createSectionFromValue(E body)