Beispiel #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;
    }
  }
Beispiel #2
0
 public void register(SelectableChannel ch, int ops, Handler h) throws IOException {
   ch.register(sel, ops, h);
 }
Beispiel #3
0
 public void register(SelectableChannel ch, int ops, Handler h) throws IOException {
   synchronized (gate) {
     sel.wakeup();
     ch.register(sel, ops, h);
   }
 }