code: @SuppressWarnings("unchecked")
      public <T> T proxy(final Object delegate, Class<?> [] interfaces)
      {
          return (T)Proxy.newProxyInstance
              (delegate.getClass().getClassLoader(),
               interfaces,
               new ProxyInvocationHandler(delegate));
      }
docs: Construct a proxy, for which each method is
  invoked by the execution server.
  @param delegate the object whose methods are to be run inside
  the worker thread.
  @return a proxy implementing the interfaces