this.join(); } catch (InterruptedException ie) {
this.join(); } catch (InterruptedException ie) {
this.join(); } catch (InterruptedException ie) {
this.join(); } catch (InterruptedException ie) {
this.join(); } catch (InterruptedException ie) {
/** * Halts running of the listener thread. */ public synchronized void stopListener() { closeListenerSockets(); // there is no need for this as the close will interrupt any i/o that is in progress // this.interrupt(); // ok, closing a connection socket will cause the connection thread to remove it from the list as it // exits so we keep on closing them and waiting until the list is empty while(connections.size() > 0) { Socket conn = connections.get(0); try { conn.close(); } catch (Exception e) { // ignore } try { wait(); } catch (InterruptedException e) { // ignore } } // make sure this listener thread has exited before we return try { this.join(); } catch (InterruptedException ie) { } }
/** * Halts running of the listener thread. */ public synchronized void stopListener() { closeListenerSockets(); // there is no need for this as the close will interrupt any i/o that is in progress // this.interrupt(); // ok, closing a connection socket will cause the connection thread to remove it from the list as it // exits so we keep on closing them and waiting until the list is empty while(connections.size() > 0) { Socket conn = connections.get(0); try { conn.close(); } catch (Exception e) { // ignore } try { wait(); } catch (InterruptedException e) { // ignore } } // make sure this listener thread has exited before we return try { this.join(); } catch (InterruptedException ie) { } }
/** * Halts running of the listener thread. */ public synchronized void stopListener() { closeListenerSockets(); // there is no need for this as the close will interrupt any i/o that is in progress // this.interrupt(); // ok, closing a connection socket will cause the connection thread to remove it from the list as it // exits so we keep on closing them and waiting until the list is empty while(connections.size() > 0) { Socket conn = connections.get(0); try { conn.close(); } catch (Exception e) { // ignore } try { wait(); } catch (InterruptedException e) { // ignore } } // make sure this listener thread has exited before we return try { this.join(); } catch (InterruptedException ie) { } }
/** * Halts running of the listener thread. */ public synchronized void stopListener() { closeListenerSockets(); // there is no need for this as the close will interrupt any i/o that is in progress // this.interrupt(); // ok, closing a connection socket will cause the connection thread to remove it from the list as it // exits so we keep on closing them and waiting until the list is empty while(connections.size() > 0) { Socket conn = connections.get(0); try { conn.close(); } catch (Exception e) { // ignore } try { wait(); } catch (InterruptedException e) { // ignore } } // make sure this listener thread has exited before we return try { this.join(); } catch (InterruptedException ie) { } }
/** * Halts running of the listener thread. */ public synchronized void stopListener() { closeListenerSockets(); // there is no need for this as the close will interrupt any i/o that is in progress // this.interrupt(); // ok, closing a connection socket will cause the connection thread to remove it from the list as it // exits so we keep on closing them and waiting until the list is empty while(connections.size() > 0) { Socket conn = connections.get(0); try { conn.close(); } catch (Exception e) { // ignore } try { wait(); } catch (InterruptedException e) { // ignore } } // make sure this listener thread has exited before we return try { this.join(); } catch (InterruptedException ie) { } }
/** * Halts running of the listener thread. */ public synchronized void stopListener() { closeListenerSockets(); // there is no need for this as the close will interrupt any i/o that is in progress // this.interrupt(); // ok, closing a connection socket will cause the connection thread to remove it from the list as it // exits so we keep on closing them and waiting until the list is empty while(connections.size() > 0) { Socket conn = connections.get(0); try { conn.close(); } catch (Exception e) { // ignore } try { wait(); } catch (InterruptedException e) { // ignore } } // make sure this listener thread has exited before we return try { this.join(); } catch (InterruptedException ie) { } }