public class ServerChannelContext extends ChannelContext
ChannelContext.CloseCode, ChannelContext.CloseMeta
asynchronousSocketChannel, closeLock, closeMeta, decodeRunnable, handlerRunnable, hasTempDir, heartbeatTimeout, isClosed, isReconnect, isRemoved, isVirtual, isWaitingClose, logWhenDecodeError, packetNeededLength, sendRunnable, sslFacadeContext, stat, tioConfig, UNKNOWN_ADDRESS_IP, UNKNOWN_ADDRESS_PORT_SEQ, userid, writeCompletionHandler
Constructor and Description |
---|
ServerChannelContext(TioConfig tioConfig)
创建一个虚拟ChannelContext,主要用来模拟一些操作,真实场景中用得少
|
ServerChannelContext(TioConfig tioConfig,
AsynchronousSocketChannel asynchronousSocketChannel) |
ServerChannelContext(TioConfig tioConfig,
String id)
创建一个虚拟ChannelContext,主要用来模拟一些操作,譬如压力测试,真实场景中用得少
|
Modifier and Type | Method and Description |
---|---|
Node |
createClientNode(AsynchronousSocketChannel asynchronousSocketChannel)
创建Node
|
boolean |
isServer()
是否是服务器端
|
equals, get, getAttribute, getBsId, getClientNode, getCloseCode, getGroups, getHeartbeatTimeout, getId, getProxyClientNode, getReadBufferSize, getReadCompletionHandler, getServerNode, getTioConfig, getToken, getWriteCompletionHandler, hashCode, init, processAfterSent, set, setAsynchronousSocketChannel, setAttribute, setBsId, setClientNode, setCloseCode, setClosed, setHeartbeatTimeout, setPacketNeededLength, setProxyClientNode, setReadBufferSize, setReconnect, setRemoved, setServerNode, setSslFacadeContext, setTioConfig, setToken, setUserid, toString
clear, clearAttribute, get, getAttribute, remove, removeAttribute, set, setAttribute
public ServerChannelContext(TioConfig tioConfig, AsynchronousSocketChannel asynchronousSocketChannel)
tioConfig
- asynchronousSocketChannel
- public ServerChannelContext(TioConfig tioConfig)
tioConfig
- public Node createClientNode(AsynchronousSocketChannel asynchronousSocketChannel) throws IOException
ChannelContext
createClientNode
in class ChannelContext
asynchronousSocketChannel
- IOException
ChannelContext.createClientNode(java.nio.channels.AsynchronousSocketChannel)
public boolean isServer()
ChannelContext
isServer
in class ChannelContext
Copyright © 2021. All rights reserved.