KickJava   Java API By Example, From Geeks To Geeks.

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


1 package com.mockobjects.jms;
2
3 import com.mockobjects.*;
4 import javax.jms.*;
5
6 public class MockTopicConnectionFactory extends MockObject
7 implements TopicConnectionFactory{
8
9     private final ReturnValue topicConnectionToReturn = new ReturnValue("topic connection");
10
11     public void setupCreateTopicConnection(
12         TopicConnection topicConnectionToReturn){
13
14         this.topicConnectionToReturn.setValue(topicConnectionToReturn);
15     }
16
17     public TopicConnection createTopicConnection() throws JMSException{
18         return (TopicConnection)topicConnectionToReturn.getValue();
19     }
20
21     public TopicConnection createTopicConnection(String JavaDoc userName,
22         String JavaDoc password) throws JMSException{
23         return (TopicConnection)topicConnectionToReturn.getValue();
24     }
25
26 }
27
Popular Tags