1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.springframework.jms.connection;
18
19 import javax.jms.Connection;
20 import javax.jms.ConnectionConsumer;
21 import javax.jms.ConnectionMetaData;
22 import javax.jms.Destination;
23 import javax.jms.ExceptionListener;
24 import javax.jms.JMSException;
25 import javax.jms.ServerSessionPool;
26 import javax.jms.Session;
27 import javax.jms.Topic;
28
29
30
31
32 public class TestConnection implements Connection {
33
34 private ExceptionListener exceptionListener;
35
36 private int startCount;
37
38 private int closeCount;
39
40
41 @Override
42 public Session createSession(boolean b, int i) throws JMSException {
43 return null;
44 }
45
46 @Override
47 public String getClientID() throws JMSException {
48 return null;
49 }
50
51 @Override
52 public void setClientID(String paramName) throws JMSException {
53 }
54
55 @Override
56 public ConnectionMetaData getMetaData() throws JMSException {
57 return null;
58 }
59
60 @Override
61 public ExceptionListener getExceptionListener() throws JMSException {
62 return exceptionListener;
63 }
64
65 @Override
66 public void setExceptionListener(ExceptionListener exceptionListener) throws JMSException {
67 this.exceptionListener = exceptionListener;
68 }
69
70 @Override
71 public void start() throws JMSException {
72 this.startCount++;
73 }
74
75 @Override
76 public void stop() throws JMSException {
77 }
78
79 @Override
80 public void close() throws JMSException {
81 this.closeCount++;
82 }
83
84 @Override
85 public ConnectionConsumer createConnectionConsumer(Destination destination, String paramName, ServerSessionPool serverSessionPool, int i) throws JMSException {
86 return null;
87 }
88
89 @Override
90 public ConnectionConsumer createDurableConnectionConsumer(Topic topic, String paramName, String paramName1, ServerSessionPool serverSessionPool, int i) throws JMSException {
91 return null;
92 }
93
94
95 public int getStartCount() {
96 return startCount;
97 }
98
99 public int getCloseCount() {
100 return closeCount;
101 }
102
103 }