Code example for Selector

Methods: closewakeup

0
     */ 
    protected void stopListening() { 
        setListen(false); 
        if (selector != null) {
            try { 
                selector.wakeup();
                selector.close();
            } catch (Exception x) {
                log.error("Unable to close cluster receiver selector.", x);
            } finally { 
                selector = null;
            } 
        } 
    } 
 
    // ---------------------------------------------------------- 
 
    /** 
     * Register the given channel with the given selector for 
     * the given operations of interest 
     */