You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
143 lines
2.4 KiB
143 lines
2.4 KiB
5 years ago
|
/* */ package javax.jms;
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */ public class QueueRequestor
|
||
|
/* */ {
|
||
|
/* */ QueueSession session;
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */ Queue queue;
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */ TemporaryQueue tempQueue;
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */ QueueSender sender;
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */ QueueReceiver receiver;
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */ public QueueRequestor(QueueSession session, Queue queue)
|
||
|
/* */ throws JMSException
|
||
|
/* */ {
|
||
|
/* 86 */ this.session = session;
|
||
|
/* 87 */ this.queue = queue;
|
||
|
/* 88 */ this.tempQueue = session.createTemporaryQueue();
|
||
|
/* 89 */ this.sender = session.createSender(queue);
|
||
|
/* 90 */ this.receiver = session.createReceiver(this.tempQueue);
|
||
|
/* */ }
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */ public Message request(Message message)
|
||
|
/* */ throws JMSException
|
||
|
/* */ {
|
||
|
/* 108 */ message.setJMSReplyTo(this.tempQueue);
|
||
|
/* 109 */ this.sender.send(message);
|
||
|
/* 110 */ return this.receiver.receive();
|
||
|
/* */ }
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */ public void close()
|
||
|
/* */ throws JMSException
|
||
|
/* */ {
|
||
|
/* 134 */ this.session.close();
|
||
|
/* 135 */ this.tempQueue.delete();
|
||
|
/* */ }
|
||
|
/* */ }
|
||
|
|
||
|
|
||
|
/* Location: D:\git\basic_core_2\base-stable\core-log4j\lib\javax.jms.jar!\javax\jms\QueueRequestor.class
|
||
|
* Java compiler version: 5 (49.0)
|
||
|
* JD-Core Version: 0.7.1
|
||
|
*/
|