LISTENER
- 监听器类型public interface INioEventGroup<LISTENER extends IListener<INioSession>> extends Closeable
Modifier and Type | Method and Description |
---|---|
int |
bufferSize()
缓冲区大小
|
INioCodec |
codec()
编解码器
|
int |
connectionTimeout()
连接超时时间(秒)
|
int |
executorCount()
执行线程数量
|
ExecutorService |
executorService()
执行线程池
|
boolean |
isServer()
是否为服务端
|
boolean |
isStarted()
是否已启动
|
LISTENER |
listener()
监听器
|
String |
name()
客户端/服务端名称
|
void |
name(String name)
设置客户端/服务端名称
|
NioEventProcessor |
processor()
获取事件处理器
|
NioEventProcessor |
processor(SelectionKey key)
根据通道选择键获取对象的事件处理器
|
INioSession |
session()
会话
|
void |
start()
启动
|
void |
stop()
停止
|
void start() throws IOException
IOException
- 可能产生的IO异常void stop() throws IOException
IOException
- 可能产生的IO异常INioCodec codec()
LISTENER listener()
INioSession session()
boolean isStarted()
boolean isServer()
String name()
void name(String name)
name
- 名称int bufferSize()
int executorCount()
int connectionTimeout()
ExecutorService executorService()
NioEventProcessor processor(SelectionKey key)
key
- 通道选择键NioEventProcessor processor()
Copyright © 2022. All rights reserved.