1
2
3
4
5
6
7
8
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
21
22
23 public class OptimisedProxyFactory extends CommonsPoolProxyFactory
24 {
25 public OptimisedProxyFactory(MuleDescriptor descriptor, UMOModel model)
26 {
27 super(descriptor, model);
28 }
29
30 protected Object createProxy(Object component) throws UMOException
31 {
32 if (!(component instanceof Callable))
33 {
34 throw new IllegalArgumentException("Components for the Optimised Mule proxy must implement: "
35 + Callable.class.getName());
36 }
37 return new OptimisedMuleProxy((Callable) component, descriptor, pool);
38 }
39 }