/** Registers a SelectableChannel */ public boolean register(SelectableChannel sc, Communicator communicator) { try { sc.register(selector, sc.validOps(), communicator); return true; } catch (Exception e) { return false; } }
public void register(SelectableChannel ch, int ops, Handler h) throws IOException { ch.register(sel, ops, h); }
public void register(SelectableChannel ch, int ops, Handler h) throws IOException { synchronized (gate) { sel.wakeup(); ch.register(sel, ops, h); } }