1 23 package org.objectweb.joram.client.jms; 24 25 import javax.jms.JMSException ; 26 import javax.jms.MessageListener ; 27 28 import org.objectweb.joram.client.jms.connection.RequestMultiplexer; 29 import org.objectweb.joram.shared.client.ConsumerMessages; 30 import org.objectweb.util.monolog.api.BasicLevel; 31 32 35 public class SingleSessionConsumer extends MessageConsumerListener { 36 37 private Session sess; 38 39 42 SingleSessionConsumer( 43 boolean queueMode, 44 boolean durable, 45 String selector, 46 String targetName, 47 Session session, 48 MessageListener listener, 49 int queueMessageReadMax, 50 int topicActivationThreshold, 51 int topicPassivationThreshold, 52 int topicAckBufferMax, 53 RequestMultiplexer reqMultiplexer) { 54 super(queueMode, durable, selector, targetName, 55 listener, queueMessageReadMax, 56 topicActivationThreshold, 57 topicPassivationThreshold, topicAckBufferMax, 58 reqMultiplexer); 59 sess = session; 60 } 61 62 63 public void pushMessages(ConsumerMessages cm) throws JMSException { 64 sess.pushMessages(this, cm); 65 } 66 67 public void onMessage(Message msg, MessageListener listener, int ackMode) 68 throws JMSException { 69 throw new Error ("Invalid call"); 70 } 71 } 72 | Popular Tags |