protected void handleWriteReady() {
   state |= WRITE_READY;
   writeReadyTask.run();
 }
 protected void handleReadReady() {
   state |= READ_READY;
   readReadyTask.run();
 }