Example #1
0
  /** Registers a SelectableChannel */
  public boolean register(SelectableChannel sc, Communicator communicator) {
    try {
      sc.register(selector, sc.validOps(), communicator);

      return true;
    } catch (Exception e) {
      return false;
    }
  }
Example #2
0
 public void register(SelectableChannel ch, int ops, Handler h) throws IOException {
   ch.register(sel, ops, h);
 }
Example #3
0
 public void register(SelectableChannel ch, int ops, Handler h) throws IOException {
   synchronized (gate) {
     sel.wakeup();
     ch.register(sel, ops, h);
   }
 }