Interface AmqpLink
- All Superinterfaces:
AmqpResource
- All Known Implementing Classes:
AmqpAbstractLink,AmqpAbstractReceiver,AmqpReceiver,AmqpSender,AmqpTransactionCoordinator
Interface used to define the operations needed to implement an AMQP
Link based endpoint, i.e. Sender, Receiver or Coordinator.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddCloseAction(Runnable action) Adds a new Runnable that is called on close of this link.voidclose(org.apache.qpid.proton.amqp.transport.ErrorCondition error) Close the Link with an error indicating the reson for the close.voidcommit(org.apache.activemq.command.LocalTransactionId txnId) Handle work necessary on commit of transacted resources associated with this Link instance.voiddelivery(org.apache.qpid.proton.engine.Delivery delivery) Called when a new Delivery arrives for the given Link.voiddetach()Request from the remote peer to detach this resource.voidflow()Handles an incoming flow control.org.apache.activemq.command.ActiveMQDestinationvoidrollback(org.apache.activemq.command.LocalTransactionId txnId) Handle work necessary on rollback of transacted resources associated with this Link instance.voidsetDestination(org.apache.activemq.command.ActiveMQDestination destination) Sets the ActiveMQDestination that this link will be servicing.Methods inherited from interface org.apache.activemq.transport.amqp.protocol.AmqpResource
close, open
-
Method Details
-
close
void close(org.apache.qpid.proton.amqp.transport.ErrorCondition error) Close the Link with an error indicating the reson for the close.- Parameters:
error- the error that prompted the close.
-
detach
void detach()Request from the remote peer to detach this resource. -
flow
Handles an incoming flow control.- Throws:
Excption- if an error occurs during the flow processing.Exception
-
delivery
Called when a new Delivery arrives for the given Link.- Parameters:
delivery- the newly arrived delivery on this link.- Throws:
Exception- if an error occurs while processing the new Delivery.
-
commit
Handle work necessary on commit of transacted resources associated with this Link instance.- Parameters:
txnId- The Transaction ID being committed.- Throws:
Exception- if an error occurs while performing the commit.
-
rollback
Handle work necessary on rollback of transacted resources associated with this Link instance.- Parameters:
txnId- The Transaction ID being rolled back.- Throws:
Exception- if an error occurs while performing the rollback.
-
getDestination
org.apache.activemq.command.ActiveMQDestination getDestination()- Returns:
- the ActiveMQDestination that this link is servicing.
-
setDestination
void setDestination(org.apache.activemq.command.ActiveMQDestination destination) Sets the ActiveMQDestination that this link will be servicing.- Parameters:
destination- the ActiveMQDestination that this link services.
-
addCloseAction
Adds a new Runnable that is called on close of this link.- Parameters:
action- a Runnable that will be executed when the link closes or detaches.
-