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

    Modifier and Type
    Method
    Description
    void
    Adds a new Runnable that is called on close of this link.
    void
    close(org.apache.qpid.proton.amqp.transport.ErrorCondition error)
    Close the Link with an error indicating the reson for the close.
    void
    commit(org.apache.activemq.command.LocalTransactionId txnId)
    Handle work necessary on commit of transacted resources associated with this Link instance.
    void
    delivery(org.apache.qpid.proton.engine.Delivery delivery)
    Called when a new Delivery arrives for the given Link.
    void
    Request from the remote peer to detach this resource.
    void
    Handles an incoming flow control.
    org.apache.activemq.command.ActiveMQDestination
     
    void
    rollback(org.apache.activemq.command.LocalTransactionId txnId)
    Handle work necessary on rollback of transacted resources associated with this Link instance.
    void
    setDestination(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

      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 Exception
      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

      void commit(org.apache.activemq.command.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(org.apache.activemq.command.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

      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

      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.