Class AMQPBrokerConnection

    • Method Detail

      • getName

        public String getName()
        Specified by:
        getName in interface org.apache.activemq.artemis.core.server.BrokerConnection
      • getProtocol

        public String getProtocol()
        Specified by:
        getProtocol in interface org.apache.activemq.artemis.core.server.BrokerConnection
      • isStarted

        public boolean isStarted()
        Specified by:
        isStarted in interface org.apache.activemq.artemis.core.server.ActiveMQComponent
      • isConnecting

        public boolean isConnecting()
      • getConnectionTimeout

        public int getConnectionTimeout()
      • stop

        public void stop()
        Specified by:
        stop in interface org.apache.activemq.artemis.core.server.ActiveMQComponent
      • start

        public void start()
                   throws Exception
        Specified by:
        start in interface org.apache.activemq.artemis.core.server.ActiveMQComponent
        Throws:
        Exception
      • getServer

        public org.apache.activemq.artemis.core.server.ActiveMQServer getServer()
      • getConnection

        public org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnection getConnection()
      • validateMatching

        public void validateMatching​(org.apache.activemq.artemis.core.server.Queue queue,
                                     AMQPBrokerConnectionElement connectionElement)
      • createLink

        public void createLink​(org.apache.activemq.artemis.core.server.Queue queue,
                               AMQPBrokerConnectionElement connectionElement)
      • addLinkClosedInterceptor

        public AMQPBrokerConnection addLinkClosedInterceptor​(String id,
                                                             Predicate<org.apache.qpid.proton.engine.Link> interceptor)
        Adds a remote link closed event interceptor that can intercept the closed event and if it returns true indicate that the close has been handled and that normal broker connection remote link closed handling should be ignored.
        Parameters:
        id - A unique Id value that identifies the intercepter for later removal.
        interceptor - The predicate that will be called for any link close.
        Returns:
        this broker connection instance.
      • removeLinkClosedInterceptor

        public AMQPBrokerConnection removeLinkClosedInterceptor​(String id)
        Remove a previously registered link close interceptor from the broker connection.
        Parameters:
        id - The id of the interceptor to remove
        Returns:
        this broker connection instance.
      • retryConnection

        public void retryConnection()
      • runtimeError

        public void runtimeError​(Throwable error)
        Provides an error API for resources of the broker connection that encounter errors during the normal operation of the resource that represent a terminal outcome for the connection. The connection retry counter will be reset to zero for these types of errors as these indicate a connection interruption that should initiate the start of a reconnect cycle if reconnection is configured.
        Parameters:
        error - The exception that describes the terminal connection error.
      • connectError

        public void connectError​(Throwable error)
        Provides an error API for resources of the broker connection that encounter errors during the connection / resource initialization phase that should constitute a terminal outcome for the connection. The connection retry counter will be incremented for these types of errors which can result in eventual termination of reconnect attempts when the limit is exceeded.
        Parameters:
        error - The exception that describes the terminal connection error.
      • error

        protected void error​(Throwable e,
                             int retryCounter)