Class AMQPFederationCommandDispatcher
- java.lang.Object
-
- org.apache.activemq.artemis.protocol.amqp.connect.federation.AMQPFederationCommandDispatcher
-
- All Implemented Interfaces:
SenderController
public class AMQPFederationCommandDispatcher extends Object implements SenderController
ASenderControllerimplementation used by the AMQP federation control link to encode and send federation policies or other commands to the remote side of the AMQP federation instance.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()org.apache.activemq.artemis.core.server.Consumerinit(ProtonServerSenderContext senderContext)voidsendCommand(AMQPMessage command)Raw send command that accepts andAMQPMessageinstance and routes it using the server post office instance.voidsendPolicy(FederationReceiveFromAddressPolicy policy)Sends the givenFederationReceiveFromAddressPolicyinstance using the control link which should instruct the remote to begin federation operations back to this peer for matching remote address.voidsendPolicy(FederationReceiveFromQueuePolicy policy)Sends the givenFederationReceiveFromQueuePolicyinstance using the control link which should instruct the remote to begin federation operations back to this peer for matching remote queues with demand.
-
-
-
Method Detail
-
sendPolicy
public void sendPolicy(FederationReceiveFromQueuePolicy policy) throws Exception
Sends the givenFederationReceiveFromQueuePolicyinstance using the control link which should instruct the remote to begin federation operations back to this peer for matching remote queues with demand.- Parameters:
policy- The policy to encode and send over the federation control link.- Throws:
Exception- if an error occurs during the control and send operation.
-
sendPolicy
public void sendPolicy(FederationReceiveFromAddressPolicy policy) throws Exception
Sends the givenFederationReceiveFromAddressPolicyinstance using the control link which should instruct the remote to begin federation operations back to this peer for matching remote address.- Parameters:
policy- The policy to encode and send over the federation control link.- Throws:
Exception- if an error occurs during the control and send operation.
-
sendCommand
public void sendCommand(AMQPMessage command) throws Exception
Raw send command that accepts andAMQPMessageinstance and routes it using the server post office instance.- Parameters:
command- The command message to send to the previously created control address.- Throws:
Exception- if an error occurs during the message send.
-
init
public org.apache.activemq.artemis.core.server.Consumer init(ProtonServerSenderContext senderContext) throws Exception
- Specified by:
initin interfaceSenderController- Throws:
Exception
-
close
public void close() throws Exception- Specified by:
closein interfaceSenderController- Throws:
Exception
-
-