Class AMQPMessageReader

java.lang.Object
org.apache.activemq.artemis.protocol.amqp.proton.AMQPMessageReader
All Implemented Interfaces:
MessageReader

public class AMQPMessageReader extends Object implements MessageReader
Reader of AMQP (non-large) messages which reads all bytes and decodes once a non-partial delivery is read.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Closes the reader and releases any in use resources.
    org.apache.qpid.proton.amqp.messaging.DeliveryAnnotations
    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.
    Reset any internal state of this reader and prepares it to begin processing a new delivery.
    readBytes(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.

    Methods inherited from class Object

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

  • Method Details

    • getDeliveryAnnotations

      public org.apache.qpid.proton.amqp.messaging.DeliveryAnnotations getDeliveryAnnotations()
      Description copied from interface: MessageReader
      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.
      Specified by:
      getDeliveryAnnotations in interface MessageReader
      Returns:
      any DeliveryAnnotations that were read as part of decoding the message
    • close

      public void close()
      Description copied from interface: MessageReader
      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.
      Specified by:
      close in interface MessageReader
    • open

      public MessageReader open()
      Description copied from interface: MessageReader
      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.
      Specified by:
      open in interface MessageReader
      Returns:
      this MessageReader instance
    • readBytes

      public Message readBytes(org.apache.qpid.proton.engine.Delivery delivery)
      Description copied from interface: MessageReader
      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.

      Specified by:
      readBytes in interface MessageReader
      Parameters:
      delivery - The delivery that has pending incoming bytes.