View Javadoc

1   package org.seasar.remoting.rmi.adaptor;
2   
3   import java.rmi.RemoteException;
4   
5   import org.seasar.extension.component.ComponentInvoker;
6   
7   /***
8    * RMIを使用してリモートメソッドの呼び出しを行うアダプタの実装クラス.
9    * 
10   * @author Kenichiro Murata
11   */
12  public class RMIAdaptorImpl implements RMIAdaptor {
13      private ComponentInvoker invoker;
14  
15      /***
16       * @see org.seasar.remoting.rmi.adaptor.RMIAdaptor#invoke(java.lang.String,
17       *      java.lang.String, java.lang.Object[])
18       */
19      public Object invoke(String componetName, String methodName, Object[] args)
20              throws RemoteException, Exception {
21          try {
22              return this.invoker.invoke(componetName, methodName, args);
23          } catch (Throwable t) {
24              throw new Exception(t);
25          }
26      }
27  
28      /***
29       * @param invoker
30       *            invoker を設定。
31       */
32      public void setInvoker(ComponentInvoker invoker) {
33          this.invoker = invoker;
34      }
35  }