KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > mockobjects > jms > MockQueueSender


1 package com.mockobjects.jms;
2
3 import com.mockobjects.*;
4 import javax.jms.*;
5
6 public class MockQueueSender extends MockMessageProducer implements QueueSender {
7
8   protected ExpectationCounter mySendCalls = new ExpectationCounter("MockQueueSender.send");
9
10   public MockQueueSender() {
11   }
12
13   public Queue getQueue() throws JMSException {
14     notImplemented();
15     return null;
16   }
17
18   public void send(Message message) throws JMSException {
19     mySendCalls.inc();
20     throwExceptionIfAny();
21   }
22
23   public void send(Message message, int deliveryMode, int priority, long timeToLive)
24     throws JMSException {
25     notImplemented();
26   }
27
28   public void send(Queue queue, Message message) throws JMSException {
29     notImplemented();
30   }
31
32   public void send(Queue queue, Message message, int deliveryMode, int priority, long timeToLive)
33     throws JMSException {
34     notImplemented();
35   }
36
37   public void setExpectedSendCalls(int callCount) {
38     mySendCalls.setExpected(callCount);
39   }
40 }
Popular Tags