Class AmqpReceiver

java.lang.Object
org.apache.activemq.transport.amqp.protocol.AmqpAbstractLink<org.apache.qpid.proton.engine.Receiver>
org.apache.activemq.transport.amqp.protocol.AmqpAbstractReceiver
org.apache.activemq.transport.amqp.protocol.AmqpReceiver
All Implemented Interfaces:
AmqpLink, AmqpResource

public class AmqpReceiver extends AmqpAbstractReceiver
An AmqpReceiver wraps the AMQP Receiver end of a link from the remote peer which holds the corresponding Sender which transfers message accross the link. The AmqpReceiver handles all incoming deliveries by converting them or wrapping them into an ActiveMQ message object and forwarding that message on to the appropriate ActiveMQ Destination.
  • Constructor Details

    • AmqpReceiver

      public AmqpReceiver(AmqpSession session, org.apache.qpid.proton.engine.Receiver endpoint, org.apache.activemq.command.ProducerInfo producerInfo)
      Create a new instance of an AmqpReceiver
      Parameters:
      session - the Session that is the parent of this AmqpReceiver instance.
      endpoint - the AMQP receiver endpoint that the class manages.
      producerInfo - the ProducerInfo instance that contains this sender's configuration.
  • Method Details

    • close

      public void close()
      Description copied from interface: AmqpResource
      Request from the remote peer to close this resource.
      Specified by:
      close in interface AmqpResource
      Overrides:
      close in class AmqpAbstractLink<org.apache.qpid.proton.engine.Receiver>
    • getProducerId

      public org.apache.activemq.command.ProducerId getProducerId()
      Returns:
      the ActiveMQ ProducerId used to register this Receiver on the Broker.
    • getDestination

      public org.apache.activemq.command.ActiveMQDestination getDestination()
      Returns:
      the ActiveMQDestination that this link is servicing.
    • setDestination

      public void setDestination(org.apache.activemq.command.ActiveMQDestination destination)
      Description copied from interface: AmqpLink
      Sets the ActiveMQDestination that this link will be servicing.
      Parameters:
      destination - the ActiveMQDestination that this link services.
    • isAnonymous

      public boolean isAnonymous()
      If the Sender that initiated this Receiver endpoint did not define an address then it is using anonymous mode and message are to be routed to the address that is defined in the AMQP message 'To' field.
      Returns:
      true if this Receiver should operate in anonymous mode.
    • getTransformer

      protected InboundTransformer getTransformer()
    • processDelivery

      protected void processDelivery(org.apache.qpid.proton.engine.Delivery delivery, org.fusesource.hawtbuf.Buffer deliveryBytes) throws Exception
      Specified by:
      processDelivery in class AmqpAbstractReceiver
      Throws:
      Exception