|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A client uses a QueueSender to send messages to a queue.
Normally the Queue is specified when a QueueSender is created and in this case, attempting to use the methods for an unidentified QueueSender will throws an UnsupportedOperationException.
In the case that the QueueSender with an unidentified Queue is created, the methods that assume the Queue has been identified throw an UnsupportedOperationException.
MessageProducer
,
QueueSession.createSender(Queue)
Method Summary | |
Queue |
getQueue()
Get the queue associated with this queue sender. |
void |
send(Message message)
Send a message to the queue. |
void |
send(Message message,
int deliveryMode,
int priority,
long timeToLive)
Send a message specifying delivery mode, priority and time to live to the queue. |
void |
send(Queue queue,
Message message)
Send a message to a queue for an unidentified message producer. |
void |
send(Queue queue,
Message message,
int deliveryMode,
int priority,
long timeToLive)
Send a message to a queue for an unidentified message producer, specifying delivery mode, priority and time to live. |
Methods inherited from interface javax.jms.MessageProducer |
close,
getDeliveryMode,
getDisableMessageID,
getDisableMessageTimestamp,
getPriority,
getTimeToLive,
setDeliveryMode,
setDisableMessageID,
setDisableMessageTimestamp,
setPriority,
setTimeToLive |
Method Detail |
public Queue getQueue() throws JMSException
public void send(Message message) throws JMSException
message
- the message to be sentpublic void send(Message message, int deliveryMode, int priority, long timeToLive) throws JMSException
message
- the message to be sentdeliveryMode
- the delivery mode to usepriority
- the priority for this messagetimeToLive
- the message's lifetime (in milliseconds).public void send(Queue queue, Message message) throws JMSException
Typically a JMS message producer is assigned a queue at creation time; however, JMS also supports unidentified message producers which require that the queue be supplied on every message send.
queue
- the queue that this message should be sent tomessage
- the message to be sentpublic void send(Queue queue, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException
Typically a JMS message producer is assigned a queue at creation time; however, JMS also supports unidentified message producers which require that the queue be supplied on every message send.
queue
- the queue that this message should be sent tomessage
- the message to be sentdeliveryMode
- the delivery mode to usepriority
- the priority for this messagetimeToLive
- the message's lifetime (in milliseconds).
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |