public class MeshClientRefererInvocationHandler<T> extends AbstractRefererHandler<T> implements InvocationHandler, CommonClient
| 限定符和类型 | 字段和说明 |
|---|---|
protected MeshClient |
meshClient |
protected URL |
refUrl |
clusters, clz, interfaceName, switcherService| 构造器和说明 |
|---|
MeshClientRefererInvocationHandler(Class<T> clz,
URL refUrl,
MeshClient meshClient)
only for InvocationHandler
|
MeshClientRefererInvocationHandler(URL refUrl,
MeshClient meshClient)
only for CommonClient
|
| 限定符和类型 | 方法和说明 |
|---|---|
Object |
asyncCall(Request request,
Class returnType)
call a service with request asynchronously
|
Object |
asyncCall(String methodName,
Object[] arguments,
Class returnType)
call a service method asynchronously
|
Request |
buildRequest(String methodName,
Object[] arguments)
build request with methodName and arguments
|
Request |
buildRequest(String interfaceName,
String methodName,
Object[] arguments)
build request with interfaceName, methodName and arguments
|
Object |
call(Request request,
Class returnType)
call a service method with request
|
Object |
call(String methodName,
Object[] arguments,
Class returnType)
call a service method
|
Object |
invoke(Object proxy,
Method method,
Object[] args) |
call, fillDefaultRequest, fillWithContext, getDefaultReturnValue, getRealReturnType, isLocalMethodprotected MeshClient meshClient
protected URL refUrl
public MeshClientRefererInvocationHandler(Class<T> clz, URL refUrl, MeshClient meshClient)
public MeshClientRefererInvocationHandler(URL refUrl, MeshClient meshClient)
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
invoke 在接口中 InvocationHandlerThrowablepublic Object call(String methodName, Object[] arguments, Class returnType) throws Throwable
CommonClientcall 在接口中 CommonClientmethodName - the method name of remote servicearguments - an array of objects containing the values of the arguments passed in the method invocationreturnType - the class type that the method returnsThrowable - exceptionpublic Object asyncCall(String methodName, Object[] arguments, Class returnType) throws Throwable
CommonClientasyncCall 在接口中 CommonClientThrowablepublic Object call(Request request, Class returnType) throws Throwable
CommonClientcall 在接口中 CommonClientThrowablepublic Object asyncCall(Request request, Class returnType) throws Throwable
CommonClientasyncCall 在接口中 CommonClientThrowablepublic Request buildRequest(String methodName, Object[] arguments)
CommonClientbuildRequest 在接口中 CommonClientpublic Request buildRequest(String interfaceName, String methodName, Object[] arguments)
CommonClientbuildRequest 在接口中 CommonClientCopyright © 2023. All rights reserved.