1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
package org.mule.transport.jms; |
8 | |
|
9 | |
import org.apache.commons.logging.Log; |
10 | |
import org.apache.commons.logging.LogFactory; |
11 | |
|
12 | |
import javax.jms.*; |
13 | |
import java.io.Serializable; |
14 | |
|
15 | |
public class ReusableTopicSessionWrapper implements TopicSession |
16 | |
{ |
17 | 0 | protected transient Log logger = LogFactory.getLog(getClass()); |
18 | |
|
19 | |
private TopicSession delegateSession; |
20 | |
|
21 | |
ReusableTopicSessionWrapper(TopicSession delegateSession) |
22 | 0 | { |
23 | 0 | this.delegateSession = delegateSession; |
24 | 0 | } |
25 | |
|
26 | |
public Topic createTopic(String topicName) throws JMSException |
27 | |
{ |
28 | 0 | return delegateSession.createTopic(topicName); |
29 | |
} |
30 | |
|
31 | |
public TopicSubscriber createSubscriber(Topic topic) throws JMSException |
32 | |
{ |
33 | 0 | return delegateSession.createSubscriber(topic); |
34 | |
} |
35 | |
|
36 | |
public TopicSubscriber createSubscriber(Topic topic, String messageSelector, boolean noLocal) throws JMSException |
37 | |
{ |
38 | 0 | return delegateSession.createSubscriber(topic, messageSelector, noLocal); |
39 | |
} |
40 | |
|
41 | |
public TopicSubscriber createDurableSubscriber(Topic topic, String name) throws JMSException |
42 | |
{ |
43 | 0 | return delegateSession.createDurableSubscriber(topic, name); |
44 | |
} |
45 | |
|
46 | |
public TopicSubscriber createDurableSubscriber(Topic topic, String name, String messageSelector, boolean noLocal) throws JMSException |
47 | |
{ |
48 | 0 | return delegateSession.createDurableSubscriber(topic, name, messageSelector, noLocal); |
49 | |
} |
50 | |
|
51 | |
public TopicPublisher createPublisher(Topic topic) throws JMSException |
52 | |
{ |
53 | 0 | return delegateSession.createPublisher(topic); |
54 | |
} |
55 | |
|
56 | |
public TemporaryTopic createTemporaryTopic() throws JMSException |
57 | |
{ |
58 | 0 | return delegateSession.createTemporaryTopic(); |
59 | |
} |
60 | |
|
61 | |
public void unsubscribe(String name) throws JMSException |
62 | |
{ |
63 | 0 | delegateSession.unsubscribe(name); |
64 | 0 | } |
65 | |
|
66 | |
public BytesMessage createBytesMessage() throws JMSException |
67 | |
{ |
68 | 0 | return delegateSession.createBytesMessage(); |
69 | |
} |
70 | |
|
71 | |
public MapMessage createMapMessage() throws JMSException |
72 | |
{ |
73 | 0 | return delegateSession.createMapMessage(); |
74 | |
} |
75 | |
|
76 | |
public Message createMessage() throws JMSException |
77 | |
{ |
78 | 0 | return delegateSession.createMessage(); |
79 | |
} |
80 | |
|
81 | |
public ObjectMessage createObjectMessage() throws JMSException |
82 | |
{ |
83 | 0 | return delegateSession.createObjectMessage(); |
84 | |
} |
85 | |
|
86 | |
public ObjectMessage createObjectMessage(Serializable object) throws JMSException |
87 | |
{ |
88 | 0 | return delegateSession.createObjectMessage(object); |
89 | |
} |
90 | |
|
91 | |
public StreamMessage createStreamMessage() throws JMSException |
92 | |
{ |
93 | 0 | return delegateSession.createStreamMessage(); |
94 | |
} |
95 | |
|
96 | |
public TextMessage createTextMessage() throws JMSException |
97 | |
{ |
98 | 0 | return delegateSession.createTextMessage(); |
99 | |
} |
100 | |
|
101 | |
public TextMessage createTextMessage(String text) throws JMSException |
102 | |
{ |
103 | 0 | return delegateSession.createTextMessage(text); |
104 | |
} |
105 | |
|
106 | |
public boolean getTransacted() throws JMSException |
107 | |
{ |
108 | 0 | return delegateSession.getTransacted(); |
109 | |
} |
110 | |
|
111 | |
public int getAcknowledgeMode() throws JMSException |
112 | |
{ |
113 | 0 | return delegateSession.getAcknowledgeMode(); |
114 | |
} |
115 | |
|
116 | |
public void commit() throws JMSException |
117 | |
{ |
118 | 0 | delegateSession.commit(); |
119 | 0 | } |
120 | |
|
121 | |
public void rollback() throws JMSException |
122 | |
{ |
123 | 0 | delegateSession.rollback(); |
124 | 0 | } |
125 | |
|
126 | |
public void close() throws JMSException |
127 | |
{ |
128 | |
|
129 | 0 | } |
130 | |
|
131 | |
public void recover() throws JMSException |
132 | |
{ |
133 | 0 | delegateSession.recover(); |
134 | 0 | } |
135 | |
|
136 | |
public MessageListener getMessageListener() throws JMSException |
137 | |
{ |
138 | 0 | return delegateSession.getMessageListener(); |
139 | |
} |
140 | |
|
141 | |
public void setMessageListener(MessageListener listener) throws JMSException |
142 | |
{ |
143 | 0 | delegateSession.setMessageListener(listener); |
144 | 0 | } |
145 | |
|
146 | |
public void run() |
147 | |
{ |
148 | 0 | delegateSession.run(); |
149 | 0 | } |
150 | |
|
151 | |
public MessageProducer createProducer(Destination destination) throws JMSException |
152 | |
{ |
153 | 0 | return delegateSession.createProducer(destination); |
154 | |
} |
155 | |
|
156 | |
public MessageConsumer createConsumer(Destination destination) throws JMSException |
157 | |
{ |
158 | 0 | return delegateSession.createConsumer(destination); |
159 | |
} |
160 | |
|
161 | |
public MessageConsumer createConsumer(Destination destination, String messageSelector) throws JMSException |
162 | |
{ |
163 | 0 | return delegateSession.createConsumer(destination, messageSelector); |
164 | |
} |
165 | |
|
166 | |
public MessageConsumer createConsumer(Destination destination, String messageSelector, boolean NoLocal) throws JMSException |
167 | |
{ |
168 | 0 | return delegateSession.createConsumer(destination, messageSelector, NoLocal); |
169 | |
} |
170 | |
|
171 | |
public Queue createQueue(String queueName) throws JMSException |
172 | |
{ |
173 | 0 | return delegateSession.createQueue(queueName); |
174 | |
} |
175 | |
|
176 | |
public QueueBrowser createBrowser(Queue queue) throws JMSException |
177 | |
{ |
178 | 0 | return delegateSession.createBrowser(queue); |
179 | |
} |
180 | |
|
181 | |
public QueueBrowser createBrowser(Queue queue, String messageSelector) throws JMSException |
182 | |
{ |
183 | 0 | return delegateSession.createBrowser(queue, messageSelector); |
184 | |
} |
185 | |
|
186 | |
public TemporaryQueue createTemporaryQueue() throws JMSException |
187 | |
{ |
188 | 0 | return delegateSession.createTemporaryQueue(); |
189 | |
} |
190 | |
} |