public NioProcessor(Executor executor,SelectorProvider selectorProvider){
  super(executor);
  try {
    if (selectorProvider == null) {
      selector=Selector.open();
    }
 else {
      selector=selectorProvider.openSelector();
    }
  }
 catch (  IOException e) {
    throw new RuntimeIoException("Failed to open a selector.",e);
  }
}

public NioProcessor ( Executor executor , SelectorProvider selectorProvider ) { super ( executor ) ; try { if ( selectorProvider == null ) { selector = Selector . open ( ) ; } else { selector = selectorProvider . openSelector ( ) ; } } catch ( IOException e ) { throw new RuntimeIoException ( "Failed to open a selector." , e ) ; } }
creates a new instance of nioprocessor .
