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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.activemq.artemis.protocol.amqp.proton.SenderController
SenderController.RejectingOutgoingMessageWriter
-
-
Field Summary
-
Fields inherited from interface org.apache.activemq.artemis.protocol.amqp.proton.SenderController
REJECTING_MESSAGE_WRITER
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Handle close of the sever sender AMQP resources.org.apache.activemq.artemis.core.server.Consumerinit(ProtonServerSenderContext senderContext)Initialize sender controller state and handle open of AMQP sender resourcesvoidsendCommand(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.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.activemq.artemis.protocol.amqp.proton.SenderController
close, selectOutgoingMessageWriter
-
-
-
-
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
Description copied from interface:SenderControllerInitialize sender controller state and handle open of AMQP sender resources- Specified by:
initin interfaceSenderController- Parameters:
senderContext- The sender context that is requesting controller initialization.- Returns:
- a server consumer that has been initialize by the controller.
- Throws:
Exception- if an error occurs during initialization.
-
close
public void close() throws ExceptionDescription copied from interface:SenderControllerHandle close of the sever sender AMQP resources.- Specified by:
closein interfaceSenderController- Throws:
Exception- if an error occurs during close.
-
-