public class RpcClient
extends io.netty.bootstrap.Bootstrap
| 构造器和说明 |
|---|
RpcClient()
Instantiates a new rpc client.
|
RpcClient(Class<? extends io.netty.channel.Channel> clientChannelClass)
Instantiates a new rpc client.
|
RpcClient(Class<? extends io.netty.channel.Channel> clientChannelClass,
RpcClientOptions rpcClientOptions)
Instantiates a new rpc client.
|
RpcClient(RpcClientOptions rpcClientOptions)
Instantiates a new rpc client.
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected ChannelPool |
getChannelPool()
Gets the channel pool.
|
long |
getNextCorrelationId()
Gets the next correlation id.
|
RpcClientOptions |
getRpcClientOptions()
Gets the rpc client options.
|
io.netty.util.Timer |
getTimer()
Gets the timer.
|
void |
invalidBrokenChannel(io.netty.channel.Channel channel,
Throwable e)
Invalid broken channel.
|
void |
registerPendingRequest(long seqId,
RpcClientCallState state)
Register pending request.
|
RpcClientCallState |
removePendingRequest(long seqId)
Removes the pending request.
|
protected void |
setChannelPool(ChannelPool channelPool)
Sets the channel pool.
|
void |
setRpcClientOptions(RpcClientOptions rpcClientOptions)
Sets the rpc client options.
|
void |
shutdown()
Shutdown.
|
void |
stop()
do shutdown action.
|
clone, clone, config, connect, connect, connect, connect, connect, remoteAddress, remoteAddress, remoteAddress, resolver, validatepublic RpcClient()
public RpcClient(RpcClientOptions rpcClientOptions)
rpcClientOptions - the rpc client optionspublic RpcClient(Class<? extends io.netty.channel.Channel> clientChannelClass)
clientChannelClass - the client channel classpublic RpcClient(Class<? extends io.netty.channel.Channel> clientChannelClass, RpcClientOptions rpcClientOptions)
clientChannelClass - the client channel classrpcClientOptions - the rpc client optionspublic RpcClientCallState removePendingRequest(long seqId)
seqId - the seq idpublic void registerPendingRequest(long seqId,
RpcClientCallState state)
seqId - the seq idstate - the stateIllegalArgumentException - the illegal argument exceptionpublic void invalidBrokenChannel(io.netty.channel.Channel channel,
Throwable e)
channel - the channele - the epublic long getNextCorrelationId()
public io.netty.util.Timer getTimer()
public RpcClientOptions getRpcClientOptions()
public void setRpcClientOptions(RpcClientOptions rpcClientOptions)
rpcClientOptions - the new rpc client optionsprotected ChannelPool getChannelPool()
protected void setChannelPool(ChannelPool channelPool)
channelPool - the new channel poolpublic void shutdown()
public void stop()
Copyright © 2022 Baidu, Inc.. All rights reserved.