📄 axclientsocketpool.java
字号:
package org.Arios.XServer;
import java.nio.channels.SelectionKey;
import java.util.Iterator;
import java.util.concurrent.CopyOnWriteArrayList;
public class AxClientSocketPool {
protected CopyOnWriteArrayList<SelectionKey> clientList = new CopyOnWriteArrayList<SelectionKey>();
protected static AxClientSocketPool instance = new AxClientSocketPool();;
protected AxClientSocketPool() {
}
public static AxClientSocketPool getInstance() {
return instance;
}
public void add(SelectionKey key) {
if (!clientList.contains(key))
clientList.add(key);
}
public void remove(SelectionKey key){
if(clientList.contains(key))
clientList.remove(key);
}
public Iterator<SelectionKey> getIterator(){
return clientList.iterator();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -