Set selectedKeys = this.selector.selectedKeys();
Iterator i = selectedKeys.iterator();
while (i.hasNext()) {
SelectionKey key = (SelectionKey) i.next();
if (key.isAcceptable()) {
ServerSocketChannel ssc = (ServerSocketChannel) key.channel();
SocketChannel sc = ssc.accept();
sc.configureBlocking(false);
sc.register(this.selector, SelectionKey.OP_READ);
} else if (key.isReadable()) {
SocketChannel sc = (SocketChannel) key.channel();