public class TioClient extends Object
| Constructor and Description |
|---|
TioClient(ClientTioConfig clientTioConfig) |
| Modifier and Type | Method and Description |
|---|---|
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() |
ClientTioConfig |
getClientTioConfig() |
void |
reconnect(ClientChannelContext channelContext,
Integer timeout) |
void |
setClientTioConfig(ClientTioConfig clientTioConfig) |
boolean |
stop() |
public TioClient(ClientTioConfig clientTioConfig) 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 ClientTioConfig getClientTioConfig()
public void reconnect(ClientChannelContext channelContext, Integer timeout) throws Exception
channelContext - timeout - 单位秒Exceptionpublic void setClientTioConfig(ClientTioConfig clientTioConfig)
clientTioConfig - the clientTioConfig to setpublic boolean stop()
Copyright © 2021. All rights reserved.