View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule.transport.jms.test;
8   
9   import java.lang.reflect.Method;
10  import java.util.List;
11  
12  import javax.jms.ConnectionFactory;
13  
14  /**
15   * Interface for testing JMS reconnections. Implementing classes should extend a
16   * particular JMS providers ConnectionFactory and throw a JMS exception when
17   * isEnabled() == false and the mule server is trying to connect to it.
18   */
19  public interface TestReconnectionConnectionFactoryWrapper extends ConnectionFactory
20  {
21      public abstract void init();
22  
23      // For InvocationHandler interface
24      public abstract Object invoke(Object proxy, Method method, Object[] args) throws Throwable;
25  
26      public abstract Object getTargetObject();
27  
28      public abstract void setEnabled(boolean enabled);
29  
30      public abstract boolean isEnabled();
31      
32      public abstract List getCalledMethods();
33      
34      public abstract void closeConnection();
35  }