public class TioClient extends Object
| 构造器和说明 |
|---|
TioClient(ClientGroupContext clientGroupContext) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
asynConnect(Node serverNode) |
void |
asynConnect(Node serverNode,
Integer timeout) |
void |
asynConnect(Node serverNode,
String bindIp,
Integer bindPort,
Integer timeout) |
ClientChannelContext |
connect(Node serverNode) |
ClientChannelContext |
connect(Node serverNode,
Integer timeout) |
ClientChannelContext |
connect(Node serverNode,
String bindIp,
Integer bindPort,
ClientChannelContext initClientChannelContext,
Integer timeout) |
ClientChannelContext |
connect(Node serverNode,
String bindIp,
Integer bindPort,
Integer timeout) |
AsynchronousChannelGroup |
getChannelGroup() |
ClientGroupContext |
getClientGroupContext() |
void |
reconnect(ClientChannelContext channelContext,
Integer timeout) |
void |
setClientGroupContext(ClientGroupContext clientGroupContext) |
boolean |
stop() |
public TioClient(ClientGroupContext clientGroupContext) throws IOException
serverIp - 可以为空serverPort - aioDecoder - aioEncoder - aioHandler - IOExceptionpublic void asynConnect(Node serverNode) throws Exception
serverNode - Exceptionpublic void asynConnect(Node serverNode, Integer timeout) throws Exception
serverNode - timeout - Exceptionpublic void asynConnect(Node serverNode, String bindIp, Integer bindPort, Integer timeout) throws Exception
serverNode - bindIp - bindPort - timeout - Exceptionpublic ClientChannelContext connect(Node serverNode) throws Exception
serverNode - Exceptionpublic ClientChannelContext connect(Node serverNode, Integer timeout) throws Exception
serverNode - timeout - Exceptionpublic ClientChannelContext connect(Node serverNode, String bindIp, Integer bindPort, ClientChannelContext initClientChannelContext, Integer timeout) throws Exception
serverNode - bindIp - bindPort - initClientChannelContext - timeout - 超时时间,单位秒Exceptionpublic ClientChannelContext connect(Node serverNode, String bindIp, Integer bindPort, Integer timeout) throws Exception
serverNode - bindIp - bindPort - timeout - 超时时间,单位秒Exceptionpublic AsynchronousChannelGroup getChannelGroup()
public ClientGroupContext getClientGroupContext()
public void reconnect(ClientChannelContext channelContext, Integer timeout) throws Exception
channelContext - timeout - Exceptionpublic void setClientGroupContext(ClientGroupContext clientGroupContext)
clientGroupContext - the clientGroupContext to setpublic boolean stop()
Copyright © 2018. All rights reserved.