Handle methods locally on the client
Method m = mi.getMethod();
String methodName = m.getName();
HttpInvokerProxyHA proxy = (HttpInvokerProxyHA) mi.getInvocationContext().getInvoker();
// Implement local methods
if( methodName.equals("toString") )
{
return toString(proxy);
}
if( methodName.equals("equals") )
{
Object[] args = mi.getArguments();
String thisString = toString(proxy);
String argsString = args[0] == null ? "" : args[0].toString();
return new Boolean(thisString.equals(argsString));
}
if( methodName.equals("hashCode") )
{
return (Integer) mi.getObjectName();
}
return getNext().invoke(mi);