public class QueueSender extends MessageProducer implements javax.jms.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 |
---|---|
javax.jms.Queue |
getQueue()
API method.
|
void |
send(javax.jms.Queue queue,
javax.jms.Message message)
API method.
|
void |
send(javax.jms.Queue queue,
javax.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, setTimeToLive
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
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 javax.jms.JMSException
sess
- The session the sender belongs to.queue
- The queue the sender sends messages to.javax.jms.IllegalStateException
- If the connection is broken.javax.jms.JMSException
- If the creation fails for any other reason.public String toString()
public javax.jms.Queue getQueue() throws javax.jms.JMSException
getQueue
in interface javax.jms.QueueSender
javax.jms.IllegalStateException
- If the sender is closed.javax.jms.JMSException
public void send(javax.jms.Queue queue, javax.jms.Message message) throws javax.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 javax.jms.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.javax.jms.IllegalStateException
- If the sender is closed, or if the
connection is broken.javax.jms.JMSException
- If the request fails for any other reason.public void send(javax.jms.Queue queue, javax.jms.Message message, int deliveryMode, int priority, long timeToLive) throws javax.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 javax.jms.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.javax.jms.IllegalStateException
- If the sender is closed, or if the
connection is broken.javax.jms.JMSException
- If the request fails for any other reason.Copyright © 2018 ScalAgent D.T.. All Rights Reserved.