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 | 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 | |
} |