Interface AmqpLink
-
- All Superinterfaces:
AmqpResource
- All Known Implementing Classes:
AmqpAbstractLink,AmqpAbstractReceiver,AmqpReceiver,AmqpSender,AmqpTransactionCoordinator
public interface AmqpLink extends AmqpResource
Interface used to define the operations needed to implement an AMQP Link based endpoint, i.e. Sender, Receiver or Coordinator.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddCloseAction(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(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.ActiveMQDestinationgetDestination()voidrollback(LocalTransactionId txnId)Handle work necessary on rollback of transacted resources associated with this Link instance.voidsetDestination(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 Detail
-
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
void flow() throws Exception
Handles an incoming flow control.- Throws:
Excption- if an error occurs during the flow processing.Exception
-
delivery
void delivery(org.apache.qpid.proton.engine.Delivery delivery) throws ExceptionCalled 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
void commit(LocalTransactionId txnId) throws Exception
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
void rollback(LocalTransactionId txnId) throws Exception
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
ActiveMQDestination getDestination()
- Returns:
- the ActiveMQDestination that this link is servicing.
-
setDestination
void setDestination(ActiveMQDestination destination)
Sets the ActiveMQDestination that this link will be servicing.- Parameters:
destination- the ActiveMQDestination that this link services.
-
addCloseAction
void addCloseAction(Runnable action)
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.
-
-