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
- IOException
public void asynConnect(Node serverNode) throws Exception
serverNode
- Exception
public void asynConnect(Node serverNode, Integer timeout) throws Exception
serverNode
- timeout
- Exception
public void asynConnect(Node serverNode, String bindIp, Integer bindPort, Integer timeout) throws Exception
serverNode
- bindIp
- bindPort
- timeout
- Exception
public ClientChannelContext connect(Node serverNode) throws Exception
serverNode
- Exception
public ClientChannelContext connect(Node serverNode, Integer timeout) throws Exception
serverNode
- timeout
- Exception
public ClientChannelContext connect(Node serverNode, String bindIp, Integer bindPort, ClientChannelContext initClientChannelContext, Integer timeout) throws Exception
serverNode
- bindIp
- bindPort
- initClientChannelContext
- timeout
- 超时时间,单位秒Exception
public ClientChannelContext connect(Node serverNode, String bindIp, Integer bindPort, Integer timeout) throws Exception
serverNode
- bindIp
- bindPort
- timeout
- 超时时间,单位秒Exception
public AsynchronousChannelGroup getChannelGroup()
public ClientTioConfig getClientTioConfig()
public void reconnect(ClientChannelContext channelContext, Integer timeout) throws Exception
channelContext
- timeout
- 单位秒Exception
public void setClientTioConfig(ClientTioConfig clientTioConfig)
clientTioConfig
- the clientTioConfig to setpublic boolean stop()
Copyright © 2021. All rights reserved.