01: package com.mockrunner.mock.jms;
02:
03: import javax.jms.JMSException;
04: import javax.jms.Message;
05: import javax.jms.Topic;
06: import javax.jms.TopicPublisher;
07:
08: /**
09: * Mock implementation of JMS <code>TopicPublisher</code>.
10: */
11: public class MockTopicPublisher extends MockMessageProducer implements
12: TopicPublisher {
13: public MockTopicPublisher(MockConnection connection,
14: MockSession session, MockTopic topic) {
15: super (connection, session, topic);
16: }
17:
18: public Topic getTopic() throws JMSException {
19: return (Topic) getDestination();
20: }
21:
22: public void publish(Message message) throws JMSException {
23: super .send(message);
24: }
25:
26: public void publish(Message message, int deliveryMode,
27: int priority, long timeToLive) throws JMSException {
28: super .send(message, deliveryMode, priority, timeToLive);
29: }
30:
31: public void publish(Topic topic, Message message)
32: throws JMSException {
33: super .send(topic, message);
34: }
35:
36: public void publish(Topic topic, Message message, int deliveryMode,
37: int priority, long timeToLive) throws JMSException {
38: super.send(topic, message, deliveryMode, priority, timeToLive);
39: }
40: }
|