1 24 package com.scalagent.kjoram; 25 26 import com.scalagent.kjoram.excepts.IllegalStateException; 27 import com.scalagent.kjoram.excepts.JMSException; 28 29 30 public class QueueSender extends MessageProducer 31 { 32 41 QueueSender(QueueSession sess, Queue queue) throws JMSException 42 { 43 super(sess, queue); 44 } 45 46 47 public String toString() 48 { 49 return "QueueSend:" + sess.ident; 50 } 51 52 57 public Queue getQueue() throws JMSException 58 { 59 if (closed) 60 throw new IllegalStateException ("Forbidden call on a closed sender."); 61 62 return (Queue) super.dest; 63 } 64 65 76 public void send(Queue queue, Message message) 77 throws JMSException 78 { 79 super.send(queue, message); 80 } 81 82 93 public void send(Queue queue, Message message, 94 int deliveryMode, int priority, 95 long timeToLive) throws JMSException 96 { 97 super.send(queue, message, deliveryMode, priority, timeToLive); 98 } 99 } 100 | Popular Tags |