Interface MessageReader
-
- All Known Implementing Classes:
AMQPLargeMessageReader,AMQPMessageReader,AMQPTunneledCoreLargeMessageReader,AMQPTunneledCoreMessageReader
public interface MessageReaderMessage reader for incoming messages from and AMQP receiver context which will handle the read and decode of message payload into am AMQP message.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Closes the reader and releases any in use resources.org.apache.qpid.proton.amqp.messaging.DeliveryAnnotationsgetDeliveryAnnotations()Once a message has been read but before the reader is closed this API offers access to any delivery annotations that were present upon decode of the read message.MessageReaderopen()Reset any internal state of this reader and prepares it to begin processing a new delivery.MessagereadBytes(org.apache.qpid.proton.engine.Delivery delivery)Reads the bytes from an incoming delivery which might not be complete yet but allows the reader to consume pending bytes to prevent stalling the sender because the session window was exhausted.
-
-
-
Method Detail
-
close
void close()
Closes the reader and releases any in use resources. If the reader was not finished processing an incoming message when closed the reader should release any resources that might be held such as large message files etc.
-
open
MessageReader open()
Reset any internal state of this reader and prepares it to begin processing a new delivery. A previously closed reader can be reset for reuse.- Returns:
- this
MessageReaderinstance.
-
readBytes
Message readBytes(org.apache.qpid.proton.engine.Delivery delivery) throws Exception
Reads the bytes from an incoming delivery which might not be complete yet but allows the reader to consume pending bytes to prevent stalling the sender because the session window was exhausted. Once a delivery has been fully read and is no longer partial the readBytes method will return the decoded message for dispatch. Notice that asynchronous Readers will never return the Message but will rather call a complete operation on the Server Receiver.- Parameters:
delivery- The delivery that has pending incoming bytes.- Throws:
Exception
-
getDeliveryAnnotations
org.apache.qpid.proton.amqp.messaging.DeliveryAnnotations getDeliveryAnnotations()
Once a message has been read but before the reader is closed this API offers access to any delivery annotations that were present upon decode of the read message.- Returns:
- any DeliveryAnnotations that were read as part of decoding the message.
-
-