public class ChannelInfo extends Object
| 限定符 | 构造器和说明 |
|---|---|
protected |
ChannelInfo() |
| 限定符和类型 | 方法和说明 |
|---|---|
long |
addRpcFuture(RpcFuture future) |
static ChannelInfo |
getClientChannelInfo(io.netty.channel.Channel channel) |
static ChannelInfo |
getOrCreateClientChannelInfo(io.netty.channel.Channel channel) |
static ChannelInfo |
getOrCreateServerChannelInfo(io.netty.channel.Channel channel) |
RpcFuture |
getRpcFuture(long logId) |
static ChannelInfo |
getServerChannelInfo(io.netty.channel.Channel channel) |
void |
handleChannelException(RpcException ex)
channel不可用时或者handler出现异常时处理逻辑
|
void |
handleRequestFail(boolean isLongConnection)
return channel when fail
|
void |
handleRequestSuccess()
return channel when success
|
void |
handleResponseFail()
return channel when fail
|
void |
handleResponseSuccess()
return channel when success
|
RpcFuture |
removeRpcFuture(long logId) |
void |
setProtocol(Protocol protocol) |
public void setProtocol(Protocol protocol)
public static ChannelInfo getOrCreateClientChannelInfo(io.netty.channel.Channel channel)
public static ChannelInfo getClientChannelInfo(io.netty.channel.Channel channel)
public static ChannelInfo getOrCreateServerChannelInfo(io.netty.channel.Channel channel)
public static ChannelInfo getServerChannelInfo(io.netty.channel.Channel channel)
public long addRpcFuture(RpcFuture future)
public RpcFuture getRpcFuture(long logId)
public RpcFuture removeRpcFuture(long logId)
public void handleRequestFail(boolean isLongConnection)
public void handleRequestSuccess()
public void handleResponseFail()
public void handleResponseSuccess()
public void handleChannelException(RpcException ex)
Copyright © 2019 Baidu, Inc.. All rights reserved.