@Override
protected void handleSelectionKey(SelectionKey sk) {
if (sk.isValid() && sk.isWritable()) {
sk.interestOps(sk.interestOps() & ~SelectionKey.OP_WRITE);
final SelectionHandler handler = (SelectionHandler) sk.attachment();
handler.handle();
}
}
}