public class JmsQueueSender extends JmsMessageProducer implements QueueSender
| Constructor and Description |
|---|
JmsQueueSender(QueueSender producer,
JmsSession session)
Create a new wrapper
|
| Modifier and Type | Method and Description |
|---|---|
Queue |
getQueue()
Gets the queue associated with this
QueueSender. |
void |
send(Queue destination,
Message message)
Sends a message to a queue for an unidentified message producer.
|
void |
send(Queue destination,
Message message,
int deliveryMode,
int priority,
long timeToLive)
Sends a message to a queue for an unidentified message producer,
specifying delivery mode, priority and time to live.
|
close, getDeliveryMode, getDestination, getDisableMessageID, getDisableMessageTimestamp, getPriority, getTimeToLive, send, send, send, send, setDeliveryMode, setDisableMessageID, setDisableMessageTimestamp, setPriority, setTimeToLiveclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsend, sendclose, getDeliveryMode, getDestination, getDisableMessageID, getDisableMessageTimestamp, getPriority, getTimeToLive, send, send, setDeliveryMode, setDisableMessageID, setDisableMessageTimestamp, setPriority, setTimeToLivepublic JmsQueueSender(QueueSender producer, JmsSession session)
producer - the producersession - the sessionpublic Queue getQueue() throws JMSException
QueueSenderQueueSender.getQueue in interface QueueSenderJMSException - if the JMS provider fails to get the queue for
this QueueSender
due to some internal error.public void send(Queue destination, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException
QueueSenderTypically, a message producer is assigned a queue at creation time; however, the JMS API also supports unidentified message producers, which require that the queue be supplied every time a message is sent.
send in interface QueueSenderdestination - the queue to send this message tomessage - the message to senddeliveryMode - the delivery mode to usepriority - the priority for this messagetimeToLive - the message's lifetime (in milliseconds)JMSException - if the JMS provider fails to send the message
due to some internal error.MessageFormatException - if an invalid message is specified.InvalidDestinationException - if a client uses
this method with an invalid queue.public void send(Queue destination, Message message) throws JMSException
QueueSenderQueueSender's default delivery mode, priority,
and time to live.
Typically, a message producer is assigned a queue at creation time; however, the JMS API also supports unidentified message producers, which require that the queue be supplied every time a message is sent.
send in interface QueueSenderdestination - the queue to send this message tomessage - the message to sendJMSException - if the JMS provider fails to send the message
due to some internal error.MessageFormatException - if an invalid message is specified.InvalidDestinationException - if a client uses
this method with an invalid queue.MessageProducer.getDeliveryMode(),
MessageProducer.getTimeToLive(),
MessageProducer.getPriority()Copyright © 2018 JBoss by Red Hat. All rights reserved.