public final Object useService(String uri, Class[] types) {
return useService(uri, types, null);
}
public final Object useService(Class type, String ns) {
HproseInvocationHandler handler = new HproseInvocationHandler(this, ns);
if (type.isInterface()) {
return Proxy.newProxyInstance(type.getClassLoader(), new Class[]{type}, handler);
}
else {
return Proxy.newProxyInstance(type.getClassLoader(), type.getInterfaces(), handler);