Class AMQPBridgeSender

java.lang.Object
org.apache.activemq.artemis.protocol.amqp.connect.bridge.AMQPBridgeSender
All Implemented Interfaces:
Closeable, AutoCloseable
Direct Known Subclasses:
AMQPBridgeToAddressSender, AMQPBridgeToQueueSender

public abstract class AMQPBridgeSender extends Object implements Closeable
Base implementation for AMQP Bridge sender implementations
  • Field Details

  • Constructor Details

  • Method Details

    • isClosed

      public boolean isClosed()
    • isInitialized

      public final boolean isInitialized()
      Returns true if the receiver has previously been initialized.
      Returns:
      true if the receiver has previously been initialized
    • initialize

      public void initialize()
      Called to initialize the AMQP bridge sender which will trigger an asynchronous task to attach the link and handle all setup sender and eventually start the flow of credit to the remote. This method should be called once after the basic configuration of the sender is complete and should not be called again after that.
    • close

      public final void close()
      Close the AMQP bridge sender instance and cleans up its resources. This method should not block and the actual resource shutdown work should occur asynchronously.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • getPolicy

      public AMQPBridgePolicy getPolicy()
      Returns the policy that this sender was configured to use.
      Returns:
      the policy that this sender was configured to use
    • getBridgeManager

      public final AMQPBridgeManager getBridgeManager()
      Returns the AMQPBridgeManager that this sender operates under.
      Returns:
      the AMQPBridgeManager that this sender operates under
    • getPolicyManager

      public AMQPBridgeToPolicyManager getPolicyManager()
      Returns the AMQPBridgeToPolicyManager that this sender operates under.
      Returns:
      the AMQPBridgeToPolicyManager that this sender operates under
    • getConfiguration

      public AMQPBridgeSenderConfiguration getConfiguration()
      Returns the AMQPBridgeSenderConfiguration that this sender operates under.
      Returns:
      the AMQPBridgeSenderConfiguration that this sender operates under
    • getSenderInfo

      public final AMQPBridgeSenderInfo getSenderInfo()
      Returns an information object that defines the characteristics of the AMQPBridgeSender.
      Returns:
      an information object that defines the characteristics of the AMQPBridgeSender
    • setRemoteOpenHandler

      public final AMQPBridgeSender setRemoteOpenHandler(Consumer<AMQPBridgeSender> handler)
      Provides and event point for notification of the sender having been opened successfully by the remote. This handler will not be called if the remote rejects the link attach and a Detach is expected to follow.
      Parameters:
      handler - The handler that will be invoked when the remote opens this sender.
      Returns:
      this sender instance.
    • setRemoteClosedHandler

      public final AMQPBridgeSender setRemoteClosedHandler(Consumer<AMQPBridgeSender> handler)
      Provides and event point for notification of the sender having been closed by the remote.
      Parameters:
      handler - The handler that will be invoked when the remote closes this sender.
      Returns:
      this sender instance.
    • doCreateSender

      protected abstract void doCreateSender()
      Handles the create of the actual AMQP sender link on the connection thread.
    • getRemoteTerminusCapabilities

      protected final org.apache.qpid.proton.amqp.Symbol[] getRemoteTerminusCapabilities()
    • remoteLinkClosedInterceptor

      protected final boolean remoteLinkClosedInterceptor(org.apache.qpid.proton.engine.Link link)