public void run() { try { while (true) { SessionMap job = queue.pop(ACCEPT_EVENT); if (job != null) { SocketChannel sc = (SocketChannel) job.getSession().get("SocketChannel"); sc.configureBlocking(false); RequestHandler handler = (RequestHandler) PoolManager.getRequestSelectorPool().get(); handler.addClient(sc); } } } catch (Exception e) { e.printStackTrace(); } }