private void handleRequest(final InterestRequest req) { // ignore the request if we are stopped/stopping if (isStopRequested()) { return; } if (Thread.currentThread() == this) { modifyInterest(req); } else { final CommThread commTh = req.getCommNIOServiceThread(); Assert.assertNotNull(commTh); commTh.addSelectorTask( new Runnable() { @Override public void run() { commTh.handleRequest(req); } }); } }