public void register(SelectableChannel channel,int ops,SelectListener selectEventListener) throws ClosedChannelException {
  disable();
  try {
{
      SelectionKey key=channel.register(sel,ops);
      supposedIOP.put(key,ops);
      map.put(key,selectEventListener);
    }
  }
  finally {
    enable();
  }
}

public void register ( SelectableChannel channel , int ops , SelectListener selectEventListener ) throws ClosedChannelException { disable ( ) ; try { { SelectionKey key = channel . register ( sel , ops ) ; supposedIOP . put ( key , ops ) ; map . put ( key , selectEventListener ) ; } } finally { enable ( ) ; } }
register a selection event handler to a selectable channel . < p > selecteventlistener is invoked by one thread at a time . the rule of thumb is that the listener must not block . note ! if channel is registered and closed , select event is invoked until the channel is unregistered .
