public class QueueSender extends MessageProducer implements jakarta.jms.QueueSender
jakarta.jms.QueueSender interface.closed, dest, sess| Constructor and Description |
|---|
QueueSender(QueueSession sess,
Destination queue)
Constructs a sender.
|
| Modifier and Type | Method and Description |
|---|---|
jakarta.jms.Queue |
getQueue()
API method.
|
void |
send(jakarta.jms.Queue queue,
jakarta.jms.Message message)
API method.
|
void |
send(jakarta.jms.Queue queue,
jakarta.jms.Message message,
int deliveryMode,
int priority,
long timeToLive)
API method.
|
String |
toString()
Returns a string view of this receiver.
|
close, getDeliveryDelay, getDeliveryMode, getDestination, getDisableMessageID, getDisableMessageTimestamp, getPriority, getTimeToLive, send, send, send, send, send, send, send, send, setDeliveryDelay, setDeliveryMode, setDisableMessageID, setDisableMessageTimestamp, setPriority, setTimeToLiveclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitclose, getDeliveryDelay, getDeliveryMode, getDestination, getDisableMessageID, getDisableMessageTimestamp, getPriority, getTimeToLive, send, send, send, send, send, send, setDeliveryDelay, setDeliveryMode, setDisableMessageID, setDisableMessageTimestamp, setPriority, setTimeToLiveQueueSender(QueueSession sess, Destination queue) throws jakarta.jms.JMSException
sess - The session the sender belongs to.queue - The queue the sender sends messages to.jakarta.jms.IllegalStateException - If the connection is broken.jakarta.jms.JMSException - If the creation fails for any other reason.public String toString()
public jakarta.jms.Queue getQueue()
throws jakarta.jms.JMSException
getQueue in interface jakarta.jms.QueueSenderjakarta.jms.IllegalStateException - If the sender is closed.jakarta.jms.JMSExceptionpublic void send(jakarta.jms.Queue queue,
jakarta.jms.Message message)
throws jakarta.jms.JMSException
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.
send in interface jakarta.jms.QueueSenderqueue - the queue to send this message to.message - the message to send.UnsupportedOperationException - When the sender did not
properly identify itself.JMSSecurityException - If the user if not a WRITER on the
specified queue.jakarta.jms.IllegalStateException - If the sender is closed, or if the
connection is broken.jakarta.jms.JMSException - If the request fails for any other reason.public void send(jakarta.jms.Queue queue,
jakarta.jms.Message message,
int deliveryMode,
int priority,
long timeToLive)
throws jakarta.jms.JMSException
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.
send in interface jakarta.jms.QueueSenderqueue - 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.UnsupportedOperationException - When the sender did not
properly identify itself.JMSSecurityException - If the user if not a WRITER on the
specified queue.jakarta.jms.IllegalStateException - If the sender is closed, or if the
connection is broken.jakarta.jms.JMSException - If the request fails for any other reason.Copyright © 2023 ScalAgent D.T.. All rights reserved.