processedParam = ((RemoteObject) param).getObjectRef();
} else if (param instanceof Proxy) {
InvocationHandler handler = Proxy.getInvocationHandler(param);
if (handler instanceof RemoteObjectInvocationHandler) {
RemoteObjectInvocationHandler roHandler = (RemoteObjectInvocationHandler) handler;
processedParam = roHandler.getRemoteObject().getObjectRef();
} else {
throw new ProtocolException(
"Only proxies from remote objects are allowed, but found one with InvocationHandler "
+ handler);
}