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.
-
-
Field Summary
-
Fields inherited from class org.apache.activemq.transport.amqp.protocol.AmqpAbstractReceiver
configuredCredit, current, recvBuffer
-
Fields inherited from class org.apache.activemq.transport.amqp.protocol.AmqpAbstractLink
closeActions, closed, endpoint, opened, session
-
-
Constructor Summary
Constructors Constructor Description AmqpReceiver(AmqpSession session, org.apache.qpid.proton.engine.Receiver endpoint, ProducerInfo producerInfo)
Create a new instance of an AmqpReceiver
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Request from the remote peer to close this resource.ActiveMQDestination
getDestination()
ProducerId
getProducerId()
protected InboundTransformer
getTransformer()
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.protected void
processDelivery(org.apache.qpid.proton.engine.Delivery delivery, org.fusesource.hawtbuf.Buffer deliveryBytes)
void
setDestination(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, rollback
-
Methods inherited from class org.apache.activemq.transport.amqp.protocol.AmqpAbstractLink
addCloseAction, close, getEndpoint, getSession, isClosed, isOpened, open, sendToActiveMQ, sendToActiveMQ
-
-
-
-
Constructor Detail
-
AmqpReceiver
public AmqpReceiver(AmqpSession session, org.apache.qpid.proton.engine.Receiver endpoint, 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 Detail
-
close
public void close()
Description copied from interface:AmqpResource
Request from the remote peer to close this resource.- Specified by:
close
in interfaceAmqpResource
- Overrides:
close
in classAmqpAbstractLink<org.apache.qpid.proton.engine.Receiver>
-
getProducerId
public ProducerId getProducerId()
- Returns:
- the ActiveMQ ProducerId used to register this Receiver on the Broker.
-
getDestination
public ActiveMQDestination getDestination()
- Returns:
- the ActiveMQDestination that this link is servicing.
-
setDestination
public void setDestination(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 classAmqpAbstractReceiver
- Throws:
Exception
-
-