01: package org.concern.controller.jmx;
02:
03: import java.lang.reflect.*;
04: import java.io.Serializable;
05:
06: class CollaborationProxy implements InvocationHandler, Serializable {
07: private String name;
08:
09: public CollaborationProxy(String name) {
10: this .name = name;
11: }
12:
13: public Object invoke(Object proxy, Method method, Object[] args)
14: throws Throwable {
15: try {
16: return method.invoke(CollaborationService
17: .getCollaboration(name), args);
18: } catch (InvocationTargetException e) {
19: throw e.getTargetException();
20: } catch (Throwable e) {
21: e.printStackTrace();
22: throw e;
23: }
24: }
25: }
|