Exemplo n.º 1
0
 public RpcContext setInvocation(Invocation invocation) {
   this.invocation = invocation;
   if (invocation != null) {
     setMethodName(invocation.getMethodName());
     setParameterTypes(invocation.getParameterTypes());
     setArguments(invocation.getArguments());
   }
   return this;
 }
Exemplo n.º 2
0
  public void invoke(final Invocation invocation) {
    try {
      Object result =
          timedCall(
              new Callable<Object>() {
                public Object call() throws Exception {
                  return invocation.target.invoke(invocation.receiver);
                }
              },
              timeout,
              TimeUnit.MILLISECONDS);

      invocation.setResult(result);

    } catch (Throwable e1) {
      invocation.setError(e1);
      return;
    }
  }