Class AMQPBridgeFromQueuePolicyManager
java.lang.Object
org.apache.activemq.artemis.protocol.amqp.connect.bridge.AMQPBridgePolicyManager
org.apache.activemq.artemis.protocol.amqp.connect.bridge.AMQPBridgeFromPolicyManager
org.apache.activemq.artemis.protocol.amqp.connect.bridge.AMQPBridgeFromQueuePolicyManager
- All Implemented Interfaces:
ActiveMQServerBasePlugin, ActiveMQServerBindingPlugin, ActiveMQServerConsumerPlugin
public final class AMQPBridgeFromQueuePolicyManager
extends AMQPBridgeFromPolicyManager
implements ActiveMQServerConsumerPlugin
AMQP Bridge policy manager that tracks local queues that match the policy configurations
for local demand and creates consumers to the remote peer configured.
-
Nested Class Summary
Nested classes/interfaces inherited from class AMQPBridgePolicyManager
AMQPBridgePolicyManager.State -
Field Summary
Fields inherited from class AMQPBridgeFromPolicyManager
configurationFields inherited from class AMQPBridgePolicyManager
bridge, connected, metrics, policyName, policyType, server, session, state -
Constructor Summary
ConstructorsConstructorDescriptionAMQPBridgeFromQueuePolicyManager(AMQPBridgeManager bridge, AMQPBridgeMetrics metric, AMQPBridgeQueuePolicy policy) -
Method Summary
Modifier and TypeMethodDescriptionvoidafterAddBinding(org.apache.activemq.artemis.core.postoffice.Binding binding) voidafterCloseConsumer(org.apache.activemq.artemis.core.server.ServerConsumer consumer, boolean failed) voidafterCreateConsumer(org.apache.activemq.artemis.core.server.ServerConsumer consumer) voidafterRemoveBinding(org.apache.activemq.artemis.core.postoffice.Binding binding, org.apache.activemq.artemis.core.transaction.Transaction tx, boolean deleteData) Returns the policy that defines the bridged queue this policy manager monitors.protected voidsafeCleanupManagerResources(boolean force) The subclass implements this method and should remove all tracked AMQP bridge resource data and also close all links either by first safely stopping the link or if offline simply closing the links immediately.protected voidScans all server resources and push them through the normal checks that would be done on an add.Methods inherited from class AMQPBridgeFromPolicyManager
handleConnectionInterrupted, handleConnectionRestored, handleManagerInitialized, handleManagerShutdown, handleManagerStarted, handleManagerStopped, tryCloseBridgeReceiverMethods inherited from class AMQPBridgePolicyManager
connectionInterrupted, connectionRestored, failIfShutdown, getBridgeManager, getMetrics, getPolicyName, getPolicyType, initialize, isActive, isConnected, isStarted, shutdown, start, stopMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ActiveMQServerBasePlugin
init, registered, setInit, unregisteredMethods inherited from interface ActiveMQServerBindingPlugin
beforeAddBinding, beforeRemoveBindingMethods inherited from interface ActiveMQServerConsumerPlugin
beforeCloseConsumer, beforeCreateConsumer, beforeCreateConsumer
-
Constructor Details
-
AMQPBridgeFromQueuePolicyManager
public AMQPBridgeFromQueuePolicyManager(AMQPBridgeManager bridge, AMQPBridgeMetrics metric, AMQPBridgeQueuePolicy policy)
-
-
Method Details
-
getPolicy
Returns the policy that defines the bridged queue this policy manager monitors.- Specified by:
getPolicyin classAMQPBridgePolicyManager- Returns:
- the policy that defines the bridged queue this policy manager monitors
-
scanManagedResources
protected void scanManagedResources()Description copied from class:AMQPBridgeFromPolicyManagerScans all server resources and push them through the normal checks that would be done on an add. This allows for checks on demand after a start or after a connection is restored.- Specified by:
scanManagedResourcesin classAMQPBridgeFromPolicyManager
-
safeCleanupManagerResources
protected void safeCleanupManagerResources(boolean force) Description copied from class:AMQPBridgeFromPolicyManagerThe subclass implements this method and should remove all tracked AMQP bridge resource data and also close all links either by first safely stopping the link or if offline simply closing the links immediately. If the force flag is set to true the implementation should close the link without attempting to stop it by draining link credit before the close.- Specified by:
safeCleanupManagerResourcesin classAMQPBridgeFromPolicyManager- Parameters:
force- Should the implementation simply close the managed links without attempting a stop.
-
afterCreateConsumer
public void afterCreateConsumer(org.apache.activemq.artemis.core.server.ServerConsumer consumer) - Specified by:
afterCreateConsumerin interfaceActiveMQServerConsumerPlugin
-
afterCloseConsumer
public void afterCloseConsumer(org.apache.activemq.artemis.core.server.ServerConsumer consumer, boolean failed) - Specified by:
afterCloseConsumerin interfaceActiveMQServerConsumerPlugin
-
afterAddBinding
public void afterAddBinding(org.apache.activemq.artemis.core.postoffice.Binding binding) throws ActiveMQException - Specified by:
afterAddBindingin interfaceActiveMQServerBindingPlugin- Throws:
ActiveMQException
-
afterRemoveBinding
public void afterRemoveBinding(org.apache.activemq.artemis.core.postoffice.Binding binding, org.apache.activemq.artemis.core.transaction.Transaction tx, boolean deleteData) throws ActiveMQException - Specified by:
afterRemoveBindingin interfaceActiveMQServerBindingPlugin- Throws:
ActiveMQException
-