public abstract class ClientBase<T extends ChannelAssistant> extends Object implements ClientInternal
| 限定符和类型 | 字段和说明 |
|---|---|
protected HeartbeatHandler |
heartbeatHandler |
protected Processor |
processor |
| 构造器和说明 |
|---|
ClientBase(ClientConfig clientConfig,
T assistant) |
| 限定符和类型 | 方法和说明 |
|---|---|
Client |
config(ClientConfigHandler configHandler)
配置
|
protected abstract ClientConnector |
createConnector()
创建连接器
|
T |
getAssistant()
获取通道助理
|
ClientConfig |
getConfig()
获取配置
|
HeartbeatHandler |
getHeartbeatHandler()
获取心跳处理
|
long |
getHeartbeatInterval()
获取心跳间隔(毫秒)
|
Processor |
getProcessor()
获取处理器
|
Client |
heartbeatHandler(HeartbeatHandler handler)
设置心跳
|
Client |
listen(Listener listener)
设置监听器
|
ClientSession |
open()
打开会话
|
ClientSession |
openOrThow()
打开会话或出异常
|
protected Processor processor
protected HeartbeatHandler heartbeatHandler
public ClientBase(ClientConfig clientConfig, T assistant)
public T getAssistant()
public HeartbeatHandler getHeartbeatHandler()
getHeartbeatHandler 在接口中 ClientInternalpublic long getHeartbeatInterval()
getHeartbeatInterval 在接口中 ClientInternalpublic ClientConfig getConfig()
getConfig 在接口中 ClientInternalpublic Processor getProcessor()
getProcessor 在接口中 ClientInternalpublic Client heartbeatHandler(HeartbeatHandler handler)
heartbeatHandler 在接口中 Clientpublic Client config(ClientConfigHandler configHandler)
public ClientSession open() throws IOException
open 在接口中 ClientIOExceptionpublic ClientSession openOrThow() throws IOException
openOrThow 在接口中 ClientIOExceptionprotected abstract ClientConnector createConnector()
Copyright © 2024. All rights reserved.