Coverage Report - org.mule.impl.model.seda.optimised.OptimisedProxyFactory
 
Classes in this File Line Coverage Branch Coverage Complexity
OptimisedProxyFactory
0%
0/6
0%
0/2
2
 
 1  
 /*
 2  
  * $Id: OptimisedProxyFactory.java 7976 2007-08-21 14:26:13Z dirk.olmes $
 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.impl.model.seda.optimised;
 12  
 
 13  
 import org.mule.config.pool.CommonsPoolProxyFactory;
 14  
 import org.mule.impl.MuleDescriptor;
 15  
 import org.mule.umo.UMOException;
 16  
 import org.mule.umo.lifecycle.Callable;
 17  
 import org.mule.umo.model.UMOModel;
 18  
 
 19  
 /**
 20  
  * Creates an optimised Mule proxy for pooling which does away with the reflection
 21  
  * and inteception on objects
 22  
  */
 23  
 public class OptimisedProxyFactory extends CommonsPoolProxyFactory
 24  
 {
 25  
     public OptimisedProxyFactory(MuleDescriptor descriptor, UMOModel model)
 26  
     {
 27  0
         super(descriptor, model);
 28  0
     }
 29  
 
 30  
     protected Object createProxy(Object component) throws UMOException
 31  
     {
 32  0
         if (!(component instanceof Callable))
 33  
         {
 34  0
             throw new IllegalArgumentException("Components for the Optimised Mule proxy must implement: "
 35  0
                                                + Callable.class.getName());
 36  
         }
 37  0
         return new OptimisedMuleProxy((Callable) component, descriptor, pool);
 38  
     }
 39  
 }