public abstract class TcpConnection extends Object implements IConnection
| 限定符和类型 | 字段和说明 |
|---|---|
protected io.netty.bootstrap.Bootstrap |
bootstrap |
protected io.netty.channel.Channel |
channel |
protected ChannelStatus |
channelStatus |
protected int |
connectIndex |
protected List<IConnectionCallback> |
connectionCallbackList |
protected String |
endpoint |
protected AtomicLong |
lastActiveTime |
protected MessageProcessor |
messageProcessor |
protected INetworkEventHandler |
networkEventHandler |
protected NetworkOption |
networkOption |
protected Lock |
reentrantLock |
protected ISslOption |
sslOption |
| 构造器和说明 |
|---|
TcpConnection(NetworkOption networkOption,
ISslOption option,
MessageProcessor messageProcessor) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addConnectionCallbackList(IConnectionCallback connectionCallback) |
abstract boolean |
channelIsActive(Map param) |
boolean |
disConnect()
channel disconnect
|
io.netty.channel.Channel |
getChannel() |
ChannelStatus |
getChannelStatus() |
int |
getConnectIndex() |
String |
getEndpoint() |
Long |
getLastActiveTime() |
long |
getSendTaskCount() |
boolean |
init() |
abstract void |
notifyEvent(String endpoint) |
protected ChainErrorCode |
sendRequestInternal(int requestTimeouts,
TimeUnit timeUnit,
byte[] msg,
boolean heartBeat,
Map param) |
void |
setChannelStatus(ChannelStatus channelStatus) |
void |
setConnectIndex(int connectIndex) |
void |
setEndpoint(String endpoint) |
void |
setSendTaskCount(long sendTaskCount) |
boolean |
shutDown() |
void |
updateLastActiveTime() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconnectprotected io.netty.bootstrap.Bootstrap bootstrap
protected volatile ChannelStatus channelStatus
protected volatile io.netty.channel.Channel channel
protected final NetworkOption networkOption
protected final ISslOption sslOption
protected final Lock reentrantLock
protected MessageProcessor messageProcessor
protected final INetworkEventHandler networkEventHandler
protected int connectIndex
protected final List<IConnectionCallback> connectionCallbackList
protected AtomicLong lastActiveTime
protected String endpoint
public TcpConnection(NetworkOption networkOption, ISslOption option, MessageProcessor messageProcessor)
public int getConnectIndex()
public void setConnectIndex(int connectIndex)
public long getSendTaskCount()
public void setSendTaskCount(long sendTaskCount)
public boolean init()
init 在接口中 IConnectionpublic boolean disConnect()
IConnectiondisConnect 在接口中 IConnectionpublic boolean shutDown()
public abstract boolean channelIsActive(Map param)
public io.netty.channel.Channel getChannel()
protected ChainErrorCode sendRequestInternal(int requestTimeouts, TimeUnit timeUnit, byte[] msg, boolean heartBeat, Map param)
public ChannelStatus getChannelStatus()
public void setChannelStatus(ChannelStatus channelStatus)
public abstract void notifyEvent(String endpoint)
public void addConnectionCallbackList(IConnectionCallback connectionCallback)
public Long getLastActiveTime()
public void updateLastActiveTime()
public String getEndpoint()
public void setEndpoint(String endpoint)
Copyright © 2022. All rights reserved.