Class ClientMessageSupport
java.lang.Object
org.apache.qpid.protonj2.client.impl.ClientMessageSupport
Support methods dealing with Message types and encode or decode operations.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic <E> AdvancedMessage<E>convertMessage(Message<E> message) Converts aMessageinstance into aClientMessageinstance either by cast or by construction of a new instance with a copy of the values carried in the given message.static <E> Section<E>createSectionFromValue(E body) static Message<?>decodeMessage(ProtonBuffer buffer, Consumer<DeliveryAnnotations> daConsumer) static Message<?>decodeMessage(Decoder decoder, ProtonBuffer buffer, Consumer<DeliveryAnnotations> daConsumer) static Message<?>decodeMessage(Decoder decoder, DecoderState decoderState, ProtonBuffer buffer, Consumer<DeliveryAnnotations> daConsumer) static ProtonBufferencodeMessage(AdvancedMessage<?> message, Map<String, Object> deliveryAnnotations) static ProtonBufferencodeMessage(AdvancedMessage<?> message, Map<String, Object> deliveryAnnotations, ProtonBufferAllocator allocator) static ProtonBufferencodeMessage(Encoder encoder, ProtonBufferAllocator allocator, AdvancedMessage<?> message, Map<String, Object> deliveryAnnotations) static ProtonBufferencodeMessage(Encoder encoder, EncoderState encoderState, ProtonBufferAllocator allocator, AdvancedMessage<?> message, Map<String, Object> deliveryAnnotations) static ProtonBufferencodeSection(Section<?> section, ProtonBuffer buffer) 
- 
Constructor Details- 
ClientMessageSupportpublic ClientMessageSupport()
 
- 
- 
Method Details- 
convertMessageConverts aMessageinstance into aClientMessageinstance 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- Messagetype to attempt to convert to a- ClientMessageinstance.
- Returns:
- a ClientMessagethat represents the givenMessageinstance.
- Throws:
- ClientException- if an unrecoverable error occurs during message conversion.
 
- 
encodeSection
- 
encodeMessagepublic static ProtonBuffer encodeMessage(AdvancedMessage<?> message, Map<String, Object> deliveryAnnotations) throws ClientException- Throws:
- ClientException
 
- 
encodeMessagepublic static ProtonBuffer encodeMessage(AdvancedMessage<?> message, Map<String, Object> deliveryAnnotations, ProtonBufferAllocator allocator) throws ClientException- Throws:
- ClientException
 
- 
encodeMessagepublic static ProtonBuffer encodeMessage(Encoder encoder, ProtonBufferAllocator allocator, AdvancedMessage<?> message, Map<String, Object> deliveryAnnotations) throws ClientException- Throws:
- ClientException
 
- 
encodeMessagepublic static ProtonBuffer encodeMessage(Encoder encoder, EncoderState encoderState, ProtonBufferAllocator allocator, AdvancedMessage<?> message, Map<String, Object> deliveryAnnotations) throws ClientException- Throws:
- ClientException
 
- 
decodeMessagepublic static Message<?> decodeMessage(ProtonBuffer buffer, Consumer<DeliveryAnnotations> daConsumer) throws ClientException - Throws:
- ClientException
 
- 
decodeMessagepublic static Message<?> decodeMessage(Decoder decoder, ProtonBuffer buffer, Consumer<DeliveryAnnotations> daConsumer) throws ClientException - Throws:
- ClientException
 
- 
decodeMessagepublic static Message<?> decodeMessage(Decoder decoder, DecoderState decoderState, ProtonBuffer buffer, Consumer<DeliveryAnnotations> daConsumer) throws ClientException - Throws:
- ClientException
 
- 
createSectionFromValue
 
-