Esempio n. 1
0
 /**
  * switches the handler to read only mode
  *
  * @throws ClosedChannelException if the channel is closed
  */
 public void switchToReadOnlyMode() {
   _skey.interestOps(SelectionKey.OP_READ);
   _data.getSelector().wakeup();
 }
Esempio n. 2
0
 /**
  * switches the handler to write only mode
  *
  * @throws ClosedChannelException if the channel is closed
  */
 public void switchToWriteOnlyMode() {
   _skey.interestOps(SelectionKey.OP_WRITE);
   _data.getSelector().wakeup();
 }
Esempio n. 3
0
 /**
  * switches the handler to read / write TODO Auto-generated catch blockmode
  *
  * @throws ClosedChannelException if the channel is closed
  */
 public void switchToReadWriteMode() {
   _skey.interestOps(SelectionKey.OP_READ | SelectionKey.OP_WRITE);
   _data.getSelector().wakeup();
 }