Class AMQPBridgeFromPolicyManager
java.lang.Object
org.apache.activemq.artemis.protocol.amqp.connect.bridge.AMQPBridgePolicyManager
org.apache.activemq.artemis.protocol.amqp.connect.bridge.AMQPBridgeFromPolicyManager
- All Implemented Interfaces:
ActiveMQServerBasePlugin, ActiveMQServerBindingPlugin
- Direct Known Subclasses:
AMQPBridgeFromAddressPolicyManager, AMQPBridgeFromQueuePolicyManager
public abstract class AMQPBridgeFromPolicyManager
extends AMQPBridgePolicyManager
implements ActiveMQServerBindingPlugin
Base class for AMQP bridge policy managers that bridge from the remote peer back to
this peer for some configured resource.
-
Nested Class Summary
Nested classes/interfaces inherited from class AMQPBridgePolicyManager
AMQPBridgePolicyManager.State -
Field Summary
FieldsFields inherited from class AMQPBridgePolicyManager
bridge, connected, metrics, policyName, policyType, server, session, state -
Constructor Summary
ConstructorsConstructorDescriptionAMQPBridgeFromPolicyManager(AMQPBridgeManager bridge, AMQPBridgeMetrics metrics, String policyName, AMQPBridgeType policyType) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidOn connection interrupted a bridge policy manager needs to perform any specific actions to pause of cleanup current resources based on the connection being closed.protected voidhandleConnectionRestored(AMQPBridgeConfiguration configuration) On connection restoration a bridge policy manager needs to perform any specific actions to resume service based on a new connection having been established.protected voidOn initialize a bridge policy manager needs to perform any specific initialization actions it requires to begin tracking broker resources.protected voidOn shutdown a bridge policy manager needs to perform any specific shutdown actions it requires to cease tracking broker resources.protected voidOn start a bridge policy manager needs to perform any specific startup actions it requires to begin tracking broker resources.protected voidOn stop a bridge policy manager needs to perform any specific stopped actions it requires to cease tracking broker resources and cleanup.protected abstract 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 abstract voidScans all server resources and push them through the normal checks that would be done on an add.protected voidtryCloseBridgeReceiver(AMQPBridgeReceiver bridgeReceiver) Attempts to close a bridge receiver.Methods inherited from class AMQPBridgePolicyManager
connectionInterrupted, connectionRestored, failIfShutdown, getBridgeManager, getMetrics, getPolicy, 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
afterAddBinding, afterRemoveBinding, beforeAddBinding, beforeRemoveBinding
-
Field Details
-
configuration
-
-
Constructor Details
-
AMQPBridgeFromPolicyManager
public AMQPBridgeFromPolicyManager(AMQPBridgeManager bridge, AMQPBridgeMetrics metrics, String policyName, AMQPBridgeType policyType)
-
-
Method Details
-
handleManagerInitialized
protected void handleManagerInitialized()Description copied from class:AMQPBridgePolicyManagerOn initialize a bridge policy manager needs to perform any specific initialization actions it requires to begin tracking broker resources.- Specified by:
handleManagerInitializedin classAMQPBridgePolicyManager
-
handleManagerStarted
protected void handleManagerStarted()Description copied from class:AMQPBridgePolicyManagerOn start a bridge policy manager needs to perform any specific startup actions it requires to begin tracking broker resources.- Specified by:
handleManagerStartedin classAMQPBridgePolicyManager
-
handleManagerStopped
protected void handleManagerStopped()Description copied from class:AMQPBridgePolicyManagerOn stop a bridge policy manager needs to perform any specific stopped actions it requires to cease tracking broker resources and cleanup.- Specified by:
handleManagerStoppedin classAMQPBridgePolicyManager
-
handleManagerShutdown
protected void handleManagerShutdown()Description copied from class:AMQPBridgePolicyManagerOn shutdown a bridge policy manager needs to perform any specific shutdown actions it requires to cease tracking broker resources.- Specified by:
handleManagerShutdownin classAMQPBridgePolicyManager
-
handleConnectionInterrupted
protected void handleConnectionInterrupted()Description copied from class:AMQPBridgePolicyManagerOn connection interrupted a bridge policy manager needs to perform any specific actions to pause of cleanup current resources based on the connection being closed.- Specified by:
handleConnectionInterruptedin classAMQPBridgePolicyManager
-
handleConnectionRestored
Description copied from class:AMQPBridgePolicyManagerOn connection restoration a bridge policy manager needs to perform any specific actions to resume service based on a new connection having been established.- Specified by:
handleConnectionRestoredin classAMQPBridgePolicyManager- Parameters:
configuration- The bridge configuration relative to the currently established connection.
-
scanManagedResources
protected abstract void scanManagedResources()Scans 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. -
safeCleanupManagerResources
protected abstract void safeCleanupManagerResources(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. 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.- Parameters:
force- Should the implementation simply close the managed links without attempting a stop.
-
tryCloseBridgeReceiver
Attempts to close a bridge receiver. The method will not double close a receiver as it checks the closed state. The method is synchronized to allow for use in asynchronous call backs from bridge receivers.- Parameters:
bridgeReceiver- A bridge receiver to close, or null in which case no action is taken.
-