public void join() throws InterruptedException { task.join(); thread.join(joinTimeout); }
public void join() throws InterruptedException { task.join(); thread.join(joinTimeout); }
public void join() throws InterruptedException { task.join(); thread.join(joinTimeout); }
@Override public void close() throws IOException { if (listening) { listening = false; listenThread.terminate(); try { listenThread.join(); } catch (InterruptedException e) { // ignore } } responses.clear(); }
@Override public void close() throws IOException { if (listening) { listening = false; listenThread.terminate(); try { listenThread.join(); } catch (InterruptedException e) { // ignore } } responses.clear(); }
/** * Closes the socket and stops the listener thread. * * @throws java.io.IOException if any. */ public void close() throws IOException { boolean interrupted = false; WorkerTask l = listener; if (l != null) { l.terminate(); l.interrupt(); try { l.join(); } catch (InterruptedException ex) { interrupted = true; logger.warn(ex); } } listener = null; if (interrupted) { Thread.currentThread().interrupt(); } }
if (socketTimeout > 0) { try { l.join();
/** * Closes all open sockets and stops the internal server thread that * processes messages. */ public void close() { for (SocketEntry entry : sockets.values()) { entry.closeSession(); } WorkerTask st = server; server = null; if (st != null) { st.terminate(); st.interrupt(); try { st.join(); } catch (InterruptedException ex) { logger.warn(ex); } closeSockets(sockets); if (socketCleaner != null) { socketCleaner.cancel(); } socketCleaner = null; } }
/** * Closes all open sockets and stops the internal server thread that * processes messages. */ public void close() { WorkerTask st = server; if (st != null) { server = null; st.terminate(); st.interrupt(); try { st.join(); } catch (InterruptedException ex) { logger.warn(ex); } closeSockets(sockets); if (socketCleaner != null) { socketCleaner.cancel(); } socketCleaner = null; } }
st.interrupt(); try { st.join();
st.interrupt(); try { st.join();
st.interrupt(); try { st.join();