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
A SenderController implementation 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 Details

    • sendPolicy

      public void sendPolicy(FederationReceiveFromQueuePolicy policy) throws Exception
      Sends the given FederationReceiveFromQueuePolicy instance 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 given FederationReceiveFromAddressPolicy instance 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 and AMQPMessage instance 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: SenderController
      Initialize sender controller state and handle open of AMQP sender resources
      Specified by:
      init in interface SenderController
      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(boolean remoteClose) throws Exception
      Description copied from interface: SenderController
      Handle close of the sever sender AMQP resources either from remote link detach or local close usually due to connection drop.
      Specified by:
      close in interface SenderController
      Parameters:
      remoteClose - Indicates if the remote link detached the sender or local action closed it.
      Throws:
      Exception - if an error occurs during close.