/** * Begin accepting connections and processing invocations. */ public void serve() { // start listening, or exit if (!startListening()) { return; } // start the selector, or exit if (!startSelectorThread()) { return; } // this will block while we serve joinSelector(); // do a little cleanup stopListening(); }
/** * Begin accepting connections and processing invocations. */ public void serve() { // start listening, or exit if (!startListening()) { return; } // start the selector, or exit if (!startSelectorThread()) { return; } // this will block while we serve joinSelector(); // do a little cleanup stopListening(); }
/** * Begin accepting connections and processing invocations. */ public void serve() { // start listening, or exit if (!startListening()) { return; } // start the selector, or exit if (!startSelectorThread()) { return; } // this will block while we serve joinSelector(); // do a little cleanup stopListening(); }