    //the run in a private class.  The rest of the methods are protected
    //so they are ok.
    private class PollingThread extends Thread {
        @Override
        public void run() {
            try {           
                running = true;
                
                runLoop();
                if(log.isTraceEnabled())
					log.trace("shutting down the PollingThread");
                selector.close();
                selector = null;