View Javadoc

1   /*
2    * Copyright (c) 2005, The K-Wf Grid Consortium
3    * Fraunhofer Institute for Computer Architecture and Software Technology
4    * See http://www.kwfgrid.eu and http://www.first.fraunhofer.de for more details.
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  }