public class ClientChannelContext extends ChannelContext
ChannelContext.CloseMetaasynchronousSocketChannel, closeLock, closeMeta, decodeRunnable, groupContext, handlerRunnable, isClosed, isReconnect, isRemoved, isVirtual, isWaitingClose, packetNeededLength, sendRunnable, sslFacadeContext, stat, UNKNOWN_ADDRESS_IP, UNKNOWN_ADDRESS_PORT_SEQ, userid, writeCompletionHandler| 构造器和说明 |
|---|
ClientChannelContext(GroupContext groupContext)
创建一个虚拟ChannelContext,主要用来模拟一些操作,真实场景中用得少
|
ClientChannelContext(GroupContext groupContext,
AsynchronousSocketChannel asynchronousSocketChannel) |
| 限定符和类型 | 方法和说明 |
|---|---|
Node |
createClientNode(AsynchronousSocketChannel asynchronousSocketChannel)
创建Node
|
String |
getBindIp() |
Integer |
getBindPort() |
boolean |
isServer()
是否是服务器端
|
void |
setBindIp(String bindIp) |
void |
setBindPort(Integer bindPort) |
equals, getAttribute, getBsId, getClientNode, getGroupContext, getGroups, getId, getReadCompletionHandler, getReconnCount, getServerNode, getToken, getWriteCompletionHandler, hashCode, init, processAfterSent, setAsynchronousSocketChannel, setAttribute, setBsId, setClosed, setGroupContext, setGroups, setPacketNeededLength, setReconnCount, setReconnect, setRemoved, setServerNode, setSslFacadeContext, setToken, setUserid, toStringclearAttribute, getAttribute, removeAttribute, setAttributepublic ClientChannelContext(GroupContext groupContext, AsynchronousSocketChannel asynchronousSocketChannel)
groupContext - asynchronousSocketChannel - public ClientChannelContext(GroupContext groupContext)
groupContext - public Node createClientNode(AsynchronousSocketChannel asynchronousSocketChannel) throws IOException
ChannelContextcreateClientNode 在类中 ChannelContextasynchronousSocketChannel - IOExceptionChannelContext.createClientNode(java.nio.channels.AsynchronousSocketChannel)public String getBindIp()
public Integer getBindPort()
public void setBindIp(String bindIp)
bindIp - the bindIp to setpublic void setBindPort(Integer bindPort)
bindPort - the bindPort to setpublic boolean isServer()
ChannelContextisServer 在类中 ChannelContextCopyright © 2018. All rights reserved.