1   /*
2    * $Id: TestConnectionFactory.java 10489 2008-01-23 17:53:38Z dfeist $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.transport.jms.test;
12  
13  import javax.jms.Connection;
14  import javax.jms.JMSException;
15  import javax.jms.QueueConnection;
16  import javax.jms.QueueConnectionFactory;
17  
18  public class TestConnectionFactory implements QueueConnectionFactory
19  {
20      private String providerProperty = "NOT_SET";
21      private String connectionFactoryProperty = "NOT_SET";
22  
23      public Connection createConnection() throws JMSException
24      {
25          return null;
26      }
27  
28      public Connection createConnection(String string, String string1) throws JMSException
29      {
30          return null;
31      }
32  
33      public String getProviderProperty()
34      {
35          return providerProperty;
36      }
37  
38      /**
39       * Should NOT be called.
40       */
41      public void setProviderProperty(final String providerProperty)
42      {
43          throw new IllegalStateException("Should never be called.");
44      }
45  
46      public String getConnectionFactoryProperty()
47      {
48          return connectionFactoryProperty;
49      }
50  
51      /**
52       * MUST be called
53       */
54      public void setConnectionFactoryProperty(final String connectionFactoryProperty)
55      {
56          this.connectionFactoryProperty = connectionFactoryProperty;
57      }
58  
59      public QueueConnection createQueueConnection() throws JMSException
60      {
61          return null;
62      }
63  
64      public QueueConnection createQueueConnection(String string, String string1) throws JMSException
65      {
66          return null;
67      }
68  }