1 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 18 25 public class OptimisedProxyFactory extends CommonsPoolProxyFactory 26 { 27 public OptimisedProxyFactory(MuleDescriptor descriptor) 28 { 29 super(descriptor); 30 } 31 32 protected Object createProxy(Object component) throws UMOException 33 { 34 if (!(component instanceof Callable)) 35 { 36 throw new IllegalArgumentException ("Components for the Optimised Mule proxy must implement: " 37 + Callable.class.getName()); 38 } 39 return new OptimisedMuleProxy((Callable)component, descriptor, pool); 40 } 41 } 42 | Popular Tags |