Interface SenderController

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static MessageWriter REJECTING_MESSAGE_WRITER
      Used as an initial state for message writers in controllers to ensure that a valid version is chosen when a message is dispatched.
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      void close()
      Handle close of the sever sender AMQP resources.
      default void close​(org.apache.qpid.proton.amqp.transport.ErrorCondition error)
      Called when the sender is being locally closed due to some error or forced shutdown due to resource deletion etc.
      org.apache.activemq.artemis.core.server.Consumer init​(ProtonServerSenderContext senderContext)
      Initialize sender controller state and handle open of AMQP sender resources
      default MessageWriter selectOutgoingMessageWriter​(ProtonServerSenderContext sender, org.apache.activemq.artemis.core.server.MessageReference reference)
      Controller selects a outgoing delivery writer that will handle the encoding and writing of the target Message carried in the given MessageReference.
    • Field Detail

      • REJECTING_MESSAGE_WRITER

        static final MessageWriter REJECTING_MESSAGE_WRITER
        Used as an initial state for message writers in controllers to ensure that a valid version is chosen when a message is dispatched.
    • Method Detail

      • init

        org.apache.activemq.artemis.core.server.Consumer init​(ProtonServerSenderContext senderContext)
                                                       throws Exception
        Initialize sender controller state and handle open of AMQP sender resources
        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

        void close()
            throws Exception
        Handle close of the sever sender AMQP resources.
        Throws:
        Exception - if an error occurs during close.
      • close

        default void close​(org.apache.qpid.proton.amqp.transport.ErrorCondition error)
        Called when the sender is being locally closed due to some error or forced shutdown due to resource deletion etc. The default implementation of this API does nothing in response to this call.
        Parameters:
        error - The error condition that triggered the close.
      • selectOutgoingMessageWriter

        default MessageWriter selectOutgoingMessageWriter​(ProtonServerSenderContext sender,
                                                          org.apache.activemq.artemis.core.server.MessageReference reference)
        Controller selects a outgoing delivery writer that will handle the encoding and writing of the target Message carried in the given MessageReference. The selection process should take into account how the message pre-processing will mutate the outgoing message. The default implementation performs no caching of writers and should be overridden in subclasses to reduce GC churn, the default version is suitable for tests.
        Parameters:
        sender - The server sender that will make use of the returned delivery context.
        reference - The message that must be sent using an outgoing context
        Returns:
        an MessageWriter to use when sending the message in the reference.