Class AMQPBridgeManager

java.lang.Object
org.apache.activemq.artemis.protocol.amqp.connect.bridge.AMQPBridgeManager

public class AMQPBridgeManager extends Object
AMQP Bridge manager object that handles starting and stopping bridge operations as needed for the parent broker connection.
  • Field Details

    • state

      protected volatile org.apache.activemq.artemis.protocol.amqp.connect.bridge.AMQPBridgeManager.State state
    • connected

      protected volatile boolean connected
  • Method Details

    • initialize

      public final void initialize() throws ActiveMQException
      Initialize this bridge instance if not already initialized.
      Throws:
      ActiveMQException - if an error occurs during the initialization process.
    • start

      public final void start() throws ActiveMQException
      Starts this bridge instance if not already started.
      Throws:
      ActiveMQException - if an error occurs during the start process.
    • stop

      public final void stop() throws ActiveMQException
      Stops this bridge instance and shuts down all remote resources that the bridge currently has open and active.
      Throws:
      ActiveMQException - if an error occurs during the stop process.
    • shutdown

      public final void shutdown() throws ActiveMQException
      Shutdown this bridge instance if not already shutdown (this is a terminal operation).
      Throws:
      ActiveMQException - if an error occurs during the shutdown process.
    • getName

      public String getName()
      Returns the unique name that was assigned to this server bridge connector.
      Returns:
      the unique name that was assigned to this server bridge connector
    • getMetrics

      public AMQPBridgeMetrics getMetrics()
      Returns the metrics instance tied to this bridge instance.
      Returns:
      the metrics instance tied to this bridge instance
    • getServer

      public org.apache.activemq.artemis.core.server.ActiveMQServer getServer()
      Returns the ActiveMQServer instance assigned to this bridge.
      Returns:
      the ActiveMQServer instance assigned to this bridge
    • getBrokerConnection

      public AMQPBrokerConnection getBrokerConnection()
      Returns the AMQPBrokerConnection that this bridge is attached to.
      Returns:
      the AMQPBrokerConnection that this bridge is attached to
    • getWildcardConfiguration

      public WildcardConfiguration getWildcardConfiguration()
      Returns the WildcardConfiguration that is in use by this bridge instance.
      Returns:
      the WildcardConfiguration that is in use by this bridge instance
    • getScheduler

      public ScheduledExecutorService getScheduler()
    • isStarted

      public boolean isStarted()
      Returns true if the bridge manager has been started.
      Returns:
      true if the bridge manager has been started
    • isConnected

      public boolean isConnected()
      Returns true if the bridge manager has been marked as connected.
      Returns:
      true if the bridge manager has been marked as connected
    • connectionInterrupted

      public void connectionInterrupted() throws ActiveMQException
      Called by the parent broker connection when the connection has failed and this AMQP bridge should tear down any active resources and await a reconnect if one is allowed.
      Throws:
      ActiveMQException - if an error occurs processing the connection interrupted event
    • connectionRestored

      public void connectionRestored(AMQPConnectionContext connection, AMQPSessionContext session) throws ActiveMQException
      Called by the parent broker connection when the connection has been established and this AMQP bridge should build up its active state based on the configuration.
      Parameters:
      connection - The new Connection that represents the currently active connection.
      session - The new Session that was created for use by broker connection resources.
      Throws:
      ActiveMQException - if an error occurs processing the connection restored event
    • invokeLinkClosedInterceptors

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