void registerSelectableChannel(final RegisterableChannelImpl s, final int validOps, final Object listener, boolean needWait) 
	throws IOException, InterruptedException {	
		if(stopped) 
			return; //do nothing if stopped
		if(!isRunning())
			throw new IllegalStateException("ChannelMgr is not running, call ChannelManager.start first");
		else if(Thread.currentThread().equals(selector.getThread()))
			registerChannelOnThisThread(s, validOps, listener);
		else
			waitForRegister(s, validOps, listener, needWait);	
	}