1
2
3
4
5
6 package net.kwfgrid.gworkflowdl.protocol;
7
8 import net.kwfgrid.gworkflowdl.protocol.calls.IMethodCall;
9 import net.kwfgrid.gworkflowdl.protocol.calls.MethodCallException;
10
11 /***
12 Default implementation of the method call strategy. Just executes a MethodCall and returns the return value.
13 */
14 public class DefaultMethodCallStrategy implements IMethodCallStrategy {
15 public Object execute(IMethodCall call) throws MethodCallException {
16 try {
17 return call.execute();
18 } catch (Exception x) {
19 MethodCallException mcx = new MethodCallException(x);
20 throw mcx;
21 }
22 }
23 }