Class QueueSender

    • Constructor Detail

    • Method Detail

      • toString

        public String toString()
        Returns a string view of this receiver.
        Overrides:
        toString in class Object
      • send

        public void send​(Queue queue,
                         Message message)
                  throws JMSException
        API method. Sends a message to a queue for an unidentified queue sender with default delivery parameters.

        Typically, a queue sender is assigned a queue at creation time; however, the JMS API also supports unidentified queue sender, which require that the queue be supplied every time a message is sent.

        Specified by:
        send in interface QueueSender
        Parameters:
        queue - the queue to send this message to.
        message - the message to send.
        Throws:
        UnsupportedOperationException - When the sender did not properly identify itself.
        JMSSecurityException - If the user if not a WRITER on the specified queue.
        IllegalStateException - If the sender is closed, or if the connection is broken.
        JMSException - If the request fails for any other reason.
      • send

        public void send​(Queue queue,
                         Message message,
                         int deliveryMode,
                         int priority,
                         long timeToLive)
                  throws JMSException
        API method. Sends a message to a queue for an unidentified queue sender with given delivery parameters.

        Typically, a queue sender is assigned a queue at creation time; however, the JMS API also supports unidentified queue sender, which require that the queue be supplied every time a message is sent.

        Specified by:
        send in interface QueueSender
        Parameters:
        queue - the queue to send this message to.
        message - the message to send.
        deliveryMode - the delivery mode to use.
        priority - the priority for this message.
        timeToLive - the message's lifetime in milliseconds.
        Throws:
        UnsupportedOperationException - When the sender did not properly identify itself.
        JMSSecurityException - If the user if not a WRITER on the specified queue.
        IllegalStateException - If the sender is closed, or if the connection is broken.
        JMSException - If the request fails for any other reason.