public class RpcClient extends Object
| 构造器和说明 |
|---|
RpcClient(EndPoint endPoint) |
RpcClient(EndPoint endPoint,
RpcClientOptions options) |
RpcClient(List<EndPoint> endPoints) |
RpcClient(List<EndPoint> endPoints,
RpcClientOptions option,
List<Interceptor> interceptors) |
RpcClient(String namingServiceUrl) |
RpcClient(String namingServiceUrl,
RpcClientOptions options) |
RpcClient(String namingServiceUrl,
RpcClientOptions options,
List<Interceptor> interceptors) |
RpcClient(String serviceUrl,
RpcClientOptions options,
List<Interceptor> interceptors,
NamingServiceFactory namingServiceFactory)
parse naming service url, connect to servers
|
public RpcClient(String namingServiceUrl)
public RpcClient(String namingServiceUrl, RpcClientOptions options)
public RpcClient(String namingServiceUrl, RpcClientOptions options, List<Interceptor> interceptors)
public RpcClient(String serviceUrl, RpcClientOptions options, List<Interceptor> interceptors, NamingServiceFactory namingServiceFactory)
serviceUrl - format like "list://127.0.0.1:8200"options - rpc client optionspublic RpcClient(EndPoint endPoint)
public RpcClient(EndPoint endPoint, RpcClientOptions options)
public RpcClient(List<EndPoint> endPoints, RpcClientOptions option, List<Interceptor> interceptors)
public <T> T getProxy(RpcClient rpcClient, Class clazz, NamingOptions namingOptions)
public void setServiceInterface(Class clazz)
public void setServiceInterface(Class clazz, NamingOptions namingOptions)
public void stop()
public io.netty.channel.Channel selectChannel()
public void returnChannel(io.netty.channel.Channel channel)
public void removeChannel(io.netty.channel.Channel channel)
public <T> Future<T> sendRequest(Request request, Type responseType, RpcCallback<T> callback, RpcFuture rpcFuture, boolean isFinalTry)
public void triggerCallback(Runnable runnable)
public void removeLogId(long id)
public RpcClientOptions getRpcClientOptions()
public Protocol getProtocol()
public CopyOnWriteArrayList<BrpcChannelGroup> getHealthyInstances()
public CopyOnWriteArrayList<EndPoint> getEndPoints()
public List<Interceptor> getInterceptors()
public io.netty.bootstrap.Bootstrap getBootstrap()
public ThreadPool getWorkThreadPool()
public LoadBalanceStrategy getLoadBalanceStrategy()
public boolean isLongConnection()
public NamingService getNamingService()
Copyright © 2019 Baidu, Inc.. All rights reserved.