00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 package com.scalagent.kjoram;
00025
00026 import com.scalagent.kjoram.excepts.IllegalStateException;
00027 import com.scalagent.kjoram.excepts.JMSException;
00028
00029
00030 public class QueueSession extends Session
00031 {
00041 QueueSession(Connection cnx, boolean transacted,
00042 int acknowledgeMode) throws JMSException
00043 {
00044 super(cnx, transacted, acknowledgeMode);
00045 }
00046
00048 public String toString()
00049 {
00050 return "QueueSess:" + ident;
00051 }
00052
00053
00061 public QueueSender createSender(Queue queue)
00062 throws JMSException
00063 {
00064 if (closed)
00065 throw new IllegalStateException("Forbidden call on a closed session.");
00066
00067 return new QueueSender(this, (Queue) queue);
00068 }
00069
00077 public QueueReceiver
00078 createReceiver(Queue queue, String selector)
00079 throws JMSException
00080 {
00081 if (closed)
00082 throw new IllegalStateException("Forbidden call on a closed session.");
00083
00084 return new QueueReceiver(this, (Queue) queue, selector);
00085 }
00086
00094 public QueueReceiver createReceiver(Queue queue)
00095 throws JMSException
00096 {
00097 if (closed)
00098 throw new IllegalStateException("Forbidden call on a closed session.");
00099
00100 return new QueueReceiver(this, (Queue) queue, null);
00101 }
00102
00108 public TopicSubscriber
00109 createDurableSubscriber(Topic topic, String name,
00110 String selector,
00111 boolean noLocal) throws JMSException
00112 {
00113 throw new IllegalStateException("Forbidden call on a QueueSession.");
00114 }
00115
00121 public TopicSubscriber
00122 createDurableSubscriber(Topic topic, String name)
00123 throws JMSException
00124 {
00125 throw new IllegalStateException("Forbidden call on a QueueSession.");
00126 }
00127
00133 public Topic createTopic(String topicName) throws JMSException
00134 {
00135 throw new IllegalStateException("Forbidden call on a QueueSession.");
00136 }
00137
00143 public TemporaryTopic createTemporaryTopic() throws JMSException
00144 {
00145 throw new IllegalStateException("Forbidden call on a QueueSession.");
00146 }
00147
00153 public void unsubscribe(String name) throws JMSException
00154 {
00155 throw new IllegalStateException("Forbidden call on a QueueSession.");
00156 }
00157 }