예제 #1
0
파일: Overlord.java 프로젝트: rf/bitster
  /** Registers a SelectableChannel */
  public boolean register(SelectableChannel sc, Communicator communicator) {
    try {
      sc.register(selector, sc.validOps(), communicator);

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