private boolean iterateKeyEvents()
throws IOException {
final SelectionKey keyLocal = key;
final SelectionKeyHandler selectionKeyHandler = transport.getSelectionKeyHandler();
final IOStrategy ioStrategy = transport.getIOStrategy();
final IOEvent[] ioEvents = selectionKeyHandler.getIOEvents(keyReadyOps);
final NIOConnection connection =
selectionKeyHandler.getConnectionForKey(keyLocal);
for (IOEvent ioEvent : ioEvents) {
NIOConnection.notifyIOEventReady(connection, ioEvent);
final int interest = ioEvent.getSelectionKeyInterest();
keyReadyOps &= (~interest);
if (selectionKeyHandler.onProcessInterest(keyLocal, interest)) {
if (!ioStrategy.executeIoEvent(connection, ioEvent)) {
return false;
}
}
}