1 24 package com.scalagent.kjoram; 25 26 import com.scalagent.kjoram.excepts.JMSException; 27 import com.scalagent.kjoram.excepts.IllegalStateException; 28 29 30 public class QueueConnection extends Connection 31 { 32 41 public QueueConnection(FactoryParameters factoryParameters, 42 ConnectionItf connectionImpl) throws JMSException 43 { 44 super(factoryParameters, connectionImpl); 45 } 46 47 48 57 public ConnectionConsumer 58 createConnectionConsumer(Queue queue, String selector, 59 ServerSessionPool sessionPool, 60 int maxMessages) throws JMSException 61 { 62 if (closed) 63 throw new IllegalStateException ("Forbidden call on a closed" 64 + " connection."); 65 66 return new ConnectionConsumer(this, (Queue) queue, selector, 67 sessionPool, maxMessages); 68 } 69 70 76 public QueueSession 77 createQueueSession(boolean transacted, int acknowledgeMode) 78 throws JMSException 79 { 80 if (closed) 81 throw new IllegalStateException ("Forbidden call on a closed" 82 + " connection."); 83 84 return new QueueSession(this, transacted, acknowledgeMode); 85 } 86 87 92 public ConnectionConsumer 93 createDurableConnectionConsumer(Topic topic, String name, 94 String selector, 95 ServerSessionPool sessPool, 96 int maxMessages) throws JMSException 97 { 98 throw new IllegalStateException ("Forbidden call on a QueueConnection."); 99 } 100 } 101 | Popular Tags |