/** * This implementation defers to the {@link #accept(SelectionKey)} method if a connection is * pending. In all other cases it defers to it's parent. * * @param key The {@link SelectionKey} for the socket on which an I/O operation is pending. * @throws IOException if an error occurs while processing the pending event. */ protected void handleSelectionKeyOperation(SelectionKey key) throws IOException { if (key.isValid() && key.isAcceptable()) { this.accept(key); } else { super.handleSelectionKeyOperation(key); } }