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
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.
-
Field Summary
Fields inherited from class org.apache.activemq.transport.amqp.protocol.AmqpAbstractReceiver
configuredCredit, current, recvBufferFields inherited from class org.apache.activemq.transport.amqp.protocol.AmqpAbstractLink
closeActions, closed, endpoint, opened, session -
Constructor Summary
ConstructorsConstructorDescriptionAmqpReceiver(AmqpSession session, org.apache.qpid.proton.engine.Receiver endpoint, org.apache.activemq.command.ProducerInfo producerInfo) Create a new instance of an AmqpReceiver -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Request from the remote peer to close this resource.org.apache.activemq.command.ActiveMQDestinationorg.apache.activemq.command.ProducerIdprotected InboundTransformerbooleanIf 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.protected voidprocessDelivery(org.apache.qpid.proton.engine.Delivery delivery, org.fusesource.hawtbuf.Buffer deliveryBytes) voidsetDestination(org.apache.activemq.command.ActiveMQDestination destination) Sets the ActiveMQDestination that this link will be servicing.Methods inherited from class org.apache.activemq.transport.amqp.protocol.AmqpAbstractReceiver
commit, delivery, detach, flow, flow, getConfiguredReceiverCredit, rollbackMethods inherited from class org.apache.activemq.transport.amqp.protocol.AmqpAbstractLink
addCloseAction, close, getEndpoint, getSession, isClosed, isOpened, open, sendToActiveMQ, sendToActiveMQ
-
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:AmqpResourceRequest from the remote peer to close this resource.- Specified by:
closein interfaceAmqpResource- Overrides:
closein classAmqpAbstractLink<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:AmqpLinkSets 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
-
processDelivery
protected void processDelivery(org.apache.qpid.proton.engine.Delivery delivery, org.fusesource.hawtbuf.Buffer deliveryBytes) throws Exception - Specified by:
processDeliveryin classAmqpAbstractReceiver- Throws:
Exception
-