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.JMSException;
00027 import com.scalagent.kjoram.excepts.IllegalStateException;
00028
00029 public class TopicConnection extends Connection
00030 {
00040 public TopicConnection(FactoryParameters factoryParameters,
00041 ConnectionItf connectionImpl) throws JMSException
00042 {
00043 super(factoryParameters, connectionImpl);
00044 }
00045
00046
00056 public ConnectionConsumer
00057 createConnectionConsumer(Topic topic, String selector,
00058 ServerSessionPool sessionPool,
00059 int maxMessages) throws JMSException
00060 {
00061 if (closed)
00062 throw new IllegalStateException("Forbidden call on a closed"
00063 + " connection.");
00064
00065 return new ConnectionConsumer(this, (Topic) topic, selector,
00066 sessionPool, maxMessages);
00067 }
00068
00078 public ConnectionConsumer
00079 createDurableConnectionConsumer(Topic topic, String subName,
00080 String selector,
00081 ServerSessionPool sessPool,
00082 int maxMessages) throws JMSException
00083 {
00084 if (closed)
00085 throw new IllegalStateException("Forbidden call on a closed"
00086 + " connection.");
00087
00088 return new ConnectionConsumer(this, (Topic) topic, subName, selector,
00089 sessPool, maxMessages);
00090 }
00091
00098 public TopicSession
00099 createTopicSession(boolean transacted, int acknowledgeMode)
00100 throws JMSException
00101 {
00102 if (closed)
00103 throw new IllegalStateException("Forbidden call on a closed"
00104 + " connection.");
00105
00106 return new TopicSession(this, transacted, acknowledgeMode);
00107 }
00108 }