package com.jiuqi.mobile.core.service.base;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.rmi.server.RemoteStub;
public class DynamicStubHandler implements InvocationHandler,
java.io.Serializable
{
/**
*
*/
private static final long serialVersionUID = 1239101143926535909L;
RemoteStub stub;
// Public --------------------------------------------------------
public void setProxy(RemoteStub stub)
{
this.stub = stub;
}
// InvocationHandler implementation ------------------------------
public Object invoke(Object proxy,
Method method,
Object[] args)
throws Throwable
{
System.out.println("DynamicStubHandler!");
return stub.getRef().invoke(stub, method, args, method.hashCode());// getHash(method));
}
}