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
00030 public class QueueConnection extends Connection
00031 {
00041 public QueueConnection(FactoryParameters factoryParameters,
00042 ConnectionItf connectionImpl) throws JMSException
00043 {
00044 super(factoryParameters, connectionImpl);
00045 }
00046
00047
00057 public ConnectionConsumer
00058 createConnectionConsumer(Queue queue, String selector,
00059 ServerSessionPool sessionPool,
00060 int maxMessages) throws JMSException
00061 {
00062 if (closed)
00063 throw new IllegalStateException("Forbidden call on a closed"
00064 + " connection.");
00065
00066 return new ConnectionConsumer(this, (Queue) queue, selector,
00067 sessionPool, maxMessages);
00068 }
00069
00076 public QueueSession
00077 createQueueSession(boolean transacted, int acknowledgeMode)
00078 throws JMSException
00079 {
00080 if (closed)
00081 throw new IllegalStateException("Forbidden call on a closed"
00082 + " connection.");
00083
00084 return new QueueSession(this, transacted, acknowledgeMode);
00085 }
00086
00092 public ConnectionConsumer
00093 createDurableConnectionConsumer(Topic topic, String name,
00094 String selector,
00095 ServerSessionPool sessPool,
00096 int maxMessages) throws JMSException
00097 {
00098 throw new IllegalStateException("Forbidden call on a QueueConnection.");
00099 }
00100 }