Interface Sender

  • All Superinterfaces:
    java.lang.AutoCloseable, Link<Sender>
    All Known Implementing Classes:
    ClientSender

    public interface Sender
    extends Link<Sender>
    AMQP Sender that provides an API for sending complete Message payload data.
    • Method Detail

      • send

        Tracker send​(Message<?> message)
              throws ClientException
        Send the given message immediately if there is credit available or blocks if the link has not yet been granted credit.
        Parameters:
        message - the Message to send.
        Returns:
        the Tracker for the message delivery
        Throws:
        ClientException - if an error occurs while initiating the send operation.
      • send

        Tracker send​(Message<?> message,
                     java.util.Map<java.lang.String,​java.lang.Object> deliveryAnnotations)
              throws ClientException
        Send the given message immediately if there is credit available or blocks if the link has not yet been granted credit.
        Parameters:
        message - the Message to send.
        deliveryAnnotations - the delivery annotations that should be included in the sent Message.
        Returns:
        the Tracker for the message delivery
        Throws:
        ClientException - if an error occurs while initiating the send operation.
      • trySend

        Tracker trySend​(Message<?> message)
                 throws ClientException
        Send the given message if credit is available or returns null if no credit has been granted to the link at the time of the send attempt.
        Parameters:
        message - the Message to send if credit is available.
        Returns:
        the Tracker for the message delivery or null if no credit for sending.
        Throws:
        ClientException - if an error occurs while initiating the send operation.
      • trySend

        Tracker trySend​(Message<?> message,
                        java.util.Map<java.lang.String,​java.lang.Object> deliveryAnnotations)
                 throws ClientException
        Send the given message if credit is available or returns null if no credit has been granted to the link at the time of the send attempt.
        Parameters:
        message - the Message to send if credit is available.
        deliveryAnnotations - the delivery annotations that should be included in the sent Message.
        Returns:
        the Tracker for the message delivery or null if no credit for sending.
        Throws:
        ClientException - if an error occurs while initiating the send operation.