public class NioSelector extends Object
| 构造器和说明 |
|---|
NioSelector(Selector selector,
SocketContext socketContext)
事件监听器构造
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
eventChose()
所有的事件均在这里触发
|
SocketChannel |
getSocketChannel(SelectionKey selectionKey)
获取 socket 通道
|
void |
release() |
public NioSelector(Selector selector, SocketContext socketContext)
selector - 对象SelectorsocketContext - socketContext 对象public void eventChose()
public SocketChannel getSocketChannel(SelectionKey selectionKey) throws IOException
selectionKey - 当前 SelectionkeyIOException - IO 异常public void release()
Copyright © 2017 Voovan. All rights reserved.