Class AMQPBridgeManager
java.lang.Object
org.apache.activemq.artemis.protocol.amqp.connect.bridge.AMQPBridgeManager
AMQP Bridge manager object that handles starting and stopping bridge
operations as needed for the parent broker connection.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled 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.voidconnectionRestored(AMQPConnectionContext connection, AMQPSessionContext session) 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.Returns theAMQPBrokerConnectionthat this bridge is attached to.Returns the metrics instance tied to this bridge instance.getName()Returns the unique name that was assigned to this server bridge connector.org.apache.activemq.artemis.core.server.ActiveMQServerReturns theActiveMQServerinstance assigned to this bridge.Returns theWildcardConfigurationthat is in use by this bridge instance.final voidInitialize this bridge instance if not already initialized.protected booleaninvokeLinkClosedInterceptors(org.apache.qpid.proton.engine.Link link) booleanReturnstrueif the bridge manager has been marked as connected.booleanReturnstrueif the bridge manager has been started.final voidshutdown()Shutdown this bridge instance if not already shutdown (this is a terminal operation).final voidstart()Starts this bridge instance if not already started.final voidstop()Stops this bridge instance and shuts down all remote resources that the bridge currently has open and active.
-
Field Details
-
state
protected volatile org.apache.activemq.artemis.protocol.amqp.connect.bridge.AMQPBridgeManager.State state -
connected
protected volatile boolean connected
-
-
Method Details
-
initialize
Initialize this bridge instance if not already initialized.- Throws:
ActiveMQException- if an error occurs during the initialization process.
-
start
Starts this bridge instance if not already started.- Throws:
ActiveMQException- if an error occurs during the start process.
-
stop
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
Shutdown this bridge instance if not already shutdown (this is a terminal operation).- Throws:
ActiveMQException- if an error occurs during the shutdown process.
-
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
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 theActiveMQServerinstance assigned to this bridge.- Returns:
- the
ActiveMQServerinstance assigned to this bridge
-
getBrokerConnection
Returns theAMQPBrokerConnectionthat this bridge is attached to.- Returns:
- the
AMQPBrokerConnectionthat this bridge is attached to
-
getWildcardConfiguration
Returns theWildcardConfigurationthat is in use by this bridge instance.- Returns:
- the
WildcardConfigurationthat is in use by this bridge instance
-
getScheduler
-
isStarted
public boolean isStarted()Returnstrueif the bridge manager has been started.- Returns:
trueif the bridge manager has been started
-
isConnected
public boolean isConnected()Returnstrueif the bridge manager has been marked as connected.- Returns:
trueif the bridge manager has been marked as connected
-
connectionInterrupted
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 newConnectionthat represents the currently active connection.session- The newSessionthat 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)
-