public class QueueSender extends MessageProducer implements QueueSender
javax.jms.QueueSender
interface.closed, dest, sess
Constructor and Description |
---|
QueueSender(QueueSession sess,
Destination queue)
Constructs a sender.
|
Modifier and Type | Method and Description |
---|---|
Queue |
getQueue()
API method.
|
void |
send(Queue queue,
Message message)
API method.
|
void |
send(Queue queue,
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, setTimeToLive
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
send, send
close, getDeliveryDelay, getDeliveryMode, getDestination, getDisableMessageID, getDisableMessageTimestamp, getPriority, getTimeToLive, send, send, send, send, send, send, setDeliveryDelay, setDeliveryMode, setDisableMessageID, setDisableMessageTimestamp, setPriority, setTimeToLive
QueueSender(QueueSession sess, Destination queue) throws JMSException
sess
- The session the sender belongs to.queue
- The queue the sender sends messages to.IllegalStateException
- If the connection is broken.JMSException
- If the creation fails for any other reason.public String toString()
public Queue getQueue() throws JMSException
getQueue
in interface QueueSender
IllegalStateException
- If the sender is closed.JMSException
public void send(Queue queue, Message message) throws 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 QueueSender
queue
- 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.IllegalStateException
- If the sender is closed, or if the
connection is broken.JMSException
- If the request fails for any other reason.public void send(Queue queue, Message message, int deliveryMode, int priority, long timeToLive) throws 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 QueueSender
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.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.Copyright © 2019 ScalAgent D.T.. All rights reserved.