Coverage Report - org.mule.transport.jms.xa.ConsumerProducerInvocationHandler
 
Classes in this File Line Coverage Branch Coverage Complexity
ConsumerProducerInvocationHandler
0%
0/6
N/A
2.5
 
 1  
 /*
 2  
  * $Id: ConsumerProducerInvocationHandler.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  
 package org.mule.transport.jms.xa;
 11  
 
 12  
 import java.lang.reflect.InvocationHandler;
 13  
 import java.lang.reflect.InvocationTargetException;
 14  
 import java.lang.reflect.Method;
 15  
 
 16  
 public class ConsumerProducerInvocationHandler implements InvocationHandler
 17  
 {
 18  
 
 19  
     private Object target;
 20  
 
 21  
     public ConsumerProducerInvocationHandler(SessionInvocationHandler sessionInvocationHandler, Object target)
 22  0
     {
 23  0
         this.target = target;
 24  0
     }
 25  
 
 26  
     public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
 27  
     {
 28  
         try
 29  
         {
 30  0
             return method.invoke(target, args);
 31  
         }
 32  0
         catch (InvocationTargetException e)
 33  
         {
 34  0
             throw e.getCause();
 35  
         }
 36  
     }
 37  
 
 38  
 }