Class AmqpAbstractLink<LINK_TYPE extends org.apache.qpid.proton.engine.Link>

    • Field Detail

      • endpoint

        protected final LINK_TYPE extends org.apache.qpid.proton.engine.Link endpoint
      • closed

        protected boolean closed
      • opened

        protected boolean opened
    • Constructor Detail

      • AmqpAbstractLink

        public AmqpAbstractLink​(AmqpSession session,
                                LINK_TYPE endpoint)
        Creates a new AmqpLink type.
        Parameters:
        session - the AmqpSession that servers as the parent of this Link.
        endpoint - the link endpoint this object represents.
    • Method Detail

      • open

        public void open()
        Description copied from interface: AmqpResource
        Request from the remote peer to open this resource.
        Specified by:
        open in interface AmqpResource
      • detach

        public void detach()
        Description copied from interface: AmqpLink
        Request from the remote peer to detach this resource.
        Specified by:
        detach in interface AmqpLink
      • close

        public void close​(org.apache.qpid.proton.amqp.transport.ErrorCondition error)
        Description copied from interface: AmqpLink
        Close the Link with an error indicating the reson for the close.
        Specified by:
        close in interface AmqpLink
        Parameters:
        error - the error that prompted the close.
      • close

        public void close()
        Description copied from interface: AmqpResource
        Request from the remote peer to close this resource.
        Specified by:
        close in interface AmqpResource
      • isOpened

        public boolean isOpened()
        Returns:
        true if this link has already been opened.
      • isClosed

        public boolean isClosed()
        Returns:
        true if this link has already been closed.
      • getEndpoint

        public LINK_TYPE getEndpoint()
        Returns:
        the Proton Link type this link represents.
      • getSession

        public AmqpSession getSession()
        Returns:
        the parent AmqpSession for this Link instance.
      • addCloseAction

        public void addCloseAction​(Runnable action)
        Description copied from interface: AmqpLink
        Adds a new Runnable that is called on close of this link.
        Specified by:
        addCloseAction in interface AmqpLink
        Parameters:
        action - a Runnable that will be executed when the link closes or detaches.
      • sendToActiveMQ

        protected void sendToActiveMQ​(Command command)
        Shortcut method to hand off an ActiveMQ Command to the broker and assign a ResponseHandler to deal with any reply from the broker.
        Parameters:
        command - the Command object to send to the Broker.
      • sendToActiveMQ

        protected void sendToActiveMQ​(Command command,
                                      ResponseHandler handler)
        Shortcut method to hand off an ActiveMQ Command to the broker and assign a ResponseHandler to deal with any reply from the broker.
        Parameters:
        command - the Command object to send to the Broker.
        handler - the ResponseHandler that will handle the Broker's response.