public class RpcClient extends Object
| Constructor and Description |
|---|
RpcClient(Endpoint endPoint) |
RpcClient(Endpoint endPoint,
RpcClientOptions options) |
RpcClient(Endpoint endPoint,
RpcClientOptions options,
List<Interceptor> interceptors) |
RpcClient(List<Endpoint> endPoints) |
RpcClient(List<Endpoint> endPoints,
RpcClientOptions options) |
RpcClient(List<Endpoint> endPoints,
RpcClientOptions options,
List<Interceptor> interceptors) |
RpcClient(String namingServiceUrl) |
RpcClient(String namingServiceUrl,
RpcClientOptions options) |
RpcClient(String namingServiceUrl,
RpcClientOptions options,
List<Interceptor> interceptors)
parse naming service url, connect to servers
|
| Modifier and Type | Method and Description |
|---|---|
Response |
execute(Request request,
CommunicationOptions communicationOptions) |
<T> T |
getProxy(Class clazz) |
<T> T |
getProxy(Class clazz,
NamingOptions namingOptions) |
static <T> T |
getProxy(RpcClient rpcClient,
Class clazz) |
static <T> T |
getProxy(RpcClient rpcClient,
Class clazz,
NamingOptions namingOptions) |
void |
initGlobal(RpcClientOptions options) |
boolean |
isShutdown() |
void |
registerPushService(Object service) |
void |
setServiceInterface(Class clazz) |
void |
setServiceInterface(Class clazz,
NamingOptions namingOptions) |
void |
shutdown() |
void |
stop() |
public RpcClient(String namingServiceUrl)
public RpcClient(String namingServiceUrl, RpcClientOptions options)
public RpcClient(String namingServiceUrl, RpcClientOptions options, List<Interceptor> interceptors)
namingServiceUrl - format like "list://127.0.0.1:8200"options - rpc client optionspublic RpcClient(Endpoint endPoint)
public RpcClient(Endpoint endPoint, RpcClientOptions options)
public RpcClient(Endpoint endPoint, RpcClientOptions options, List<Interceptor> interceptors)
public RpcClient(List<Endpoint> endPoints, RpcClientOptions options)
public RpcClient(List<Endpoint> endPoints, RpcClientOptions options, List<Interceptor> interceptors)
public static <T> T getProxy(RpcClient rpcClient, Class clazz, NamingOptions namingOptions)
public void registerPushService(Object service)
service - public <T> T getProxy(Class clazz, NamingOptions namingOptions)
public <T> T getProxy(Class clazz)
public void setServiceInterface(Class clazz)
public void setServiceInterface(Class clazz, NamingOptions namingOptions)
public void shutdown()
public void stop()
public boolean isShutdown()
public Response execute(Request request, CommunicationOptions communicationOptions) throws RpcException
RpcExceptionpublic void initGlobal(RpcClientOptions options)
Copyright © 2022 Baidu, Inc.. All rights reserved.