Class AMQPFederationRemotePolicyManager
java.lang.Object
org.apache.activemq.artemis.protocol.amqp.connect.federation.AMQPFederationPolicyManager
org.apache.activemq.artemis.protocol.amqp.connect.federation.AMQPFederationRemotePolicyManager
- Direct Known Subclasses:
AMQPFederationRemoteAddressPolicyManager, AMQPFederationRemoteQueuePolicyManager
Represents the remote policy manager that is interacting with this server. A remote policy manager provides a view
into the metrics for AMQP senders dispatching message from the local broker to the remote where the local federation
address and queue policy managers create receivers based on local demand.
-
Nested Class Summary
Nested classes/interfaces inherited from class AMQPFederationPolicyManager
AMQPFederationPolicyManager.State -
Field Summary
Fields inherited from class AMQPFederationPolicyManager
connected, federation, metrics, policyName, policyType, server, session, state -
Constructor Summary
ConstructorsConstructorDescriptionAMQPFederationRemotePolicyManager(AMQPFederation federation, AMQPFederationMetrics metrics, String policyName, FederationType policyType) Create the remote policy manager instance with the given configuration. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract AMQPFederationSenderControllercreateSenderController(Consumer<AMQPFederationSenderController> closedListener) Subclass creates the actual type of federation sender controller specific to that manager type.protected voidOn connection interrupted a federation policy manager needs to perform any specific actions to pause of cleanup current resources based on the connection being closed.protected voidOn connection restoration a federation policy manager needs to perform any specific actions to resume service based on a new connection having been established.protected voidOn initialize a federation policy manager needs to perform any specific initialization actions it requires to begin tracking broker resources.protected voidOn shutdown a federation policy manager needs to perform any specific shutdown actions it requires to cease tracking broker resources.protected voidOn start a federation policy manager needs to perform any specific startup actions it requires to begin tracking broker resources.protected voidOn stop a federation policy manager needs to perform any specific stopped actions it requires to cease tracking broker resources and cleanup.Create a newAMQPFederationSenderControllerinstance for use by newly opened AMQP federation sender links initiated from the remote broker based on federation policies that have been configured or sent to that broker instance.Methods inherited from class AMQPFederationPolicyManager
connectionInterrupted, connectionRestored, failIfShutdown, getFederation, getMetrics, getPolicyName, getPolicyType, initialize, isActive, isConnected, isStarted, shutdown, start, stop
-
Constructor Details
-
AMQPFederationRemotePolicyManager
public AMQPFederationRemotePolicyManager(AMQPFederation federation, AMQPFederationMetrics metrics, String policyName, FederationType policyType) Create the remote policy manager instance with the given configuration.- Parameters:
federation- The federation endpoint this policy manager operates within.metrics- A metric object used to track work done under this policypolicyName- The name assigned to this policy by the configuration on the remote.policyType- The type of policy being managed here, address or queue.
-
-
Method Details
-
newSenderController
Create a newAMQPFederationSenderControllerinstance for use by newly opened AMQP federation sender links initiated from the remote broker based on federation policies that have been configured or sent to that broker instance.- Returns:
- a new
AMQPFederationSenderControllerto be assigned to a sender context - Throws:
ActiveMQAMQPException- if an error occurs while creating the controller
-
createSenderController
protected abstract AMQPFederationSenderController createSenderController(Consumer<AMQPFederationSenderController> closedListener) throws ActiveMQAMQPException Subclass creates the actual type of federation sender controller specific to that manager type.- Parameters:
closedListener- The closed listener to provide to the new sender controller.- Returns:
- a new
AMQPFederationSenderControllerto be assigned to a sender context - Throws:
ActiveMQAMQPException- if an error occurs while creating the controller
-
handleManagerInitialized
protected void handleManagerInitialized()Description copied from class:AMQPFederationPolicyManagerOn initialize a federation policy manager needs to perform any specific initialization actions it requires to begin tracking broker resources.- Specified by:
handleManagerInitializedin classAMQPFederationPolicyManager
-
handleManagerStarted
protected void handleManagerStarted()Description copied from class:AMQPFederationPolicyManagerOn start a federation policy manager needs to perform any specific startup actions it requires to begin tracking broker resources.- Specified by:
handleManagerStartedin classAMQPFederationPolicyManager
-
handleManagerStopped
protected void handleManagerStopped()Description copied from class:AMQPFederationPolicyManagerOn stop a federation policy manager needs to perform any specific stopped actions it requires to cease tracking broker resources and cleanup.- Specified by:
handleManagerStoppedin classAMQPFederationPolicyManager
-
handleManagerShutdown
protected void handleManagerShutdown()Description copied from class:AMQPFederationPolicyManagerOn shutdown a federation policy manager needs to perform any specific shutdown actions it requires to cease tracking broker resources.- Specified by:
handleManagerShutdownin classAMQPFederationPolicyManager
-
handleConnectionInterrupted
protected void handleConnectionInterrupted()Description copied from class:AMQPFederationPolicyManagerOn connection interrupted a federation policy manager needs to perform any specific actions to pause of cleanup current resources based on the connection being closed.- Specified by:
handleConnectionInterruptedin classAMQPFederationPolicyManager
-
handleConnectionRestored
protected void handleConnectionRestored()Description copied from class:AMQPFederationPolicyManagerOn connection restoration a federation policy manager needs to perform any specific actions to resume service based on a new connection having been established.- Specified by:
handleConnectionRestoredin classAMQPFederationPolicyManager
-