1 package com.mockobjects.jms; 2 3 import com.mockobjects.*; 4 import javax.jms.*; 5 6 public class MockQueueConnection extends MockConnection implements QueueConnection { 7 8 private final ReturnValue myQueueSession = new ReturnValue("queue session"); 9 10 public MockQueueConnection() { 11 } 12 13 public ConnectionConsumer createConnectionConsumer(Queue queue, 14 String messageSelector, ServerSessionPool sessionPool, int mexMessages) 15 throws JMSException { 16 notImplemented(); 17 return null; 18 } 19 20 public QueueSession createQueueSession(boolean transacted, 21 int acknowledgeMode) throws JMSException { 22 throwExceptionIfAny(); 23 return (QueueSession)myQueueSession.getValue(); 24 } 25 26 public void setupQueueSession(QueueSession queueSession) { 27 myQueueSession.setValue(queueSession); 28 } 29 } | Popular Tags |