1 /* 2 * $Id: TestReconnectionConnectionFactoryWrapper.java 19191 2010-08-25 21:05:23Z tcarlson $ 3 * -------------------------------------------------------------------------------------- 4 * Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.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 java.lang.reflect.Method; 14 import java.util.List; 15 16 import javax.jms.ConnectionFactory; 17 18 /** 19 * Interface for testing JMS reconnections. Implementing classes should extend a 20 * particular JMS providers ConnectionFactory and throw a JMS exception when 21 * isEnabled() == false and the mule server is trying to connect to it. 22 */ 23 public interface TestReconnectionConnectionFactoryWrapper extends ConnectionFactory 24 { 25 public abstract void init(); 26 27 // For InvocationHandler interface 28 public abstract Object invoke(Object proxy, Method method, Object[] args) throws Throwable; 29 30 public abstract Object getTargetObject(); 31 32 public abstract void setEnabled(boolean enabled); 33 34 public abstract boolean isEnabled(); 35 36 public abstract List getCalledMethods(); 37 38 public abstract void closeConnection(); 39 }