public void selectorFired()
    {
        //NOTE: we have to process registrations as close to waitOnSelector as possible.
        //otherwise, we could end up waiting on the selector when there are registrations to
        //process!!!!
        //currently, this processes the registration requests.
        fireToListeners();
        
        waitOnSelector();  
        
        //processKeys may will go through all keys and do some work, but 
        //may not do all work it could on each key.  This is to keep from any
        //client starving and from registrations starving in the case where one
        //client just overloads the server and keeps sending a stream of data.
        //he will be served with all the others in an equal priority round robin
        //fashion.
        Set<SelectionKey> keySet = selector.selectedKeys();
        if(log.isLoggable(Level.FINER))
        	log.finer(id+"keySetCnt="+keySet.size()+" registerCnt="+listenerList.getListenerCount()
        			+" needCloseOrRegister="+needCloseOrRegister+" wantShutdown="+selector.isWantShutdown());
        needCloseOrRegister = false;
        if(keySet.size() > 0) {
        	Helper.processKeys(id, keySet, this);
        }
    }