Class AMQPFederation

    • Constructor Detail

      • AMQPFederation

        public AMQPFederation​(String name,
                              org.apache.activemq.artemis.core.server.ActiveMQServer server)
    • Method Detail

      • getServer

        public org.apache.activemq.artemis.core.server.ActiveMQServer getServer()
        Specified by:
        getServer in interface Federation
        Returns:
        the ActiveMQServer instance assigned to this Federation
      • getName

        public String getName()
        Specified by:
        getName in interface Federation
        Returns:
        the unique name that was assigned to this server federation connector.
      • isStarted

        public boolean isStarted()
        Specified by:
        isStarted in interface Federation
        Returns:
        is this federation instance started (may not be connected yet).
      • getConnectionContext

        public abstract AMQPConnectionContext getConnectionContext()
        Returns:
        the session context assigned to this federation instance
      • getSessionContext

        public abstract AMQPSessionContext getSessionContext()
        Returns:
        the session context assigned to this federation instance
      • getLinkAttachTimeout

        public abstract int getLinkAttachTimeout()
        Returns:
        the timeout before signaling an error when creating remote link (0 mean disable).
      • getReceiverCredits

        public abstract int getReceiverCredits()
        Returns:
        the configured Receiver link credit batch size.
      • getReceiverCreditsLow

        public abstract int getReceiverCreditsLow()
        Returns:
        the configured Receiver link credit low value.
      • getLargeMessageThreshold

        public abstract int getLargeMessageThreshold()
        Returns:
        the size in bytes before a message is considered large.
      • isIgnoreQueueConsumerFilters

        public abstract boolean isIgnoreQueueConsumerFilters()
        Returns:
        the true if the federation should ignore filters on queue consumers.
      • isIgnoreQueueConsumerPriorities

        public abstract boolean isIgnoreQueueConsumerPriorities()
        Returns:
        the true if the federation should ignore priorities on queue consumers.
      • isCoreMessageTunnelingEnabled

        public abstract boolean isCoreMessageTunnelingEnabled()
        Returns:
        the true if the federation should support core message tunneling.
      • addLinkClosedInterceptor

        public AMQPFederation addLinkClosedInterceptor​(String id,
                                                       Predicate<org.apache.qpid.proton.engine.Link> interceptor)
        Adds a remote linked closed event interceptor that can intercept the closed event and if it returns true indicate that the close has been handled and that no further action need to be taken for this event.
        Parameters:
        id - A unique Id value that identifies the interceptor for later removal.
        interceptor - The predicate that will be called for any link close.
        Returns:
        this AMQPFederation instance.
      • removeLinkClosedInterceptor

        public AMQPFederation removeLinkClosedInterceptor​(String id)
        Remove a previously registered link close interceptor from the list of close interceptor bindings.
        Parameters:
        id - The id of the interceptor to remove
        Returns:
        this AMQPFederation instance.
      • signalResourceCreateError

        protected abstract void signalResourceCreateError​(Exception cause)
        Error signaling API that must be implemented by the specific federation implementation to handle error when creating a federation resource such as an outgoing receiver link.
        Parameters:
        cause - The error that caused the resource creation to fail.
      • signalError

        protected abstract void signalError​(Exception cause)
        Error signaling API that must be implemented by the specific federation implementation to handle errors encountered during normal operations.
        Parameters:
        cause - The error that caused the operation to fail.
      • handleFederationStarted

        protected void handleFederationStarted()
                                        throws ActiveMQException
        Provides an entry point for the concrete federation implementation to respond to being started.
        Throws:
        ActiveMQException - if an error is thrown during policy start.
      • handleFederationStopped

        protected void handleFederationStopped()
                                        throws ActiveMQException
        Provides an entry point for the concrete federation implementation to respond to being stopped.
        Throws:
        ActiveMQException - if an error is thrown during policy stop.
      • invokeLinkClosedInterceptors

        protected boolean invokeLinkClosedInterceptors​(org.apache.qpid.proton.engine.Link link)
      • signalFederationStarted

        protected void signalFederationStarted()
      • signalFederationStopped

        protected void signalFederationStopped()