@Override protected void shutDown() throws Exception { synchronized (clients) { for (BlockingClient client : clients) client.closeConnection(); } }
@Override protected void shutDown() throws Exception { synchronized (clients) { for (BlockingClient client : clients) client.closeConnection(); } }
@Override protected void shutDown() throws Exception { synchronized (clients) { for (BlockingClient client : clients) client.closeConnection(); } }
@Override protected void shutDown() throws Exception { synchronized (clients) { for (BlockingClient client : clients) client.closeConnection(); } }
@Override public synchronized void writeBytes(byte[] message) throws IOException { try { OutputStream stream = socket.getOutputStream(); stream.write(message); stream.flush(); } catch (IOException e) { log.error("Error writing message to connection, closing connection", e); closeConnection(); throw e; } }
@Override public synchronized void writeBytes(byte[] message) throws IOException { try { OutputStream stream = socket.getOutputStream(); stream.write(message); stream.flush(); } catch (IOException e) { log.error("Error writing message to connection, closing connection", e); closeConnection(); throw e; } }
@Override public synchronized void writeBytes(byte[] message) throws IOException { try { OutputStream stream = socket.getOutputStream(); stream.write(message); stream.flush(); } catch (IOException e) { log.error("Error writing message to connection, closing connection", e); closeConnection(); throw e; } }
@Override public synchronized void writeBytes(byte[] message) throws IOException { try { OutputStream stream = socket.getOutputStream(); stream.write(message); stream.flush(); } catch (IOException e) { log.error("Error writing message to connection, closing connection", e); closeConnection(); throw e; } }
@Override public void closeConnections(int n) { if (!isRunning()) throw new IllegalStateException(); synchronized (clients) { Iterator<BlockingClient> it = clients.iterator(); while (n-- > 0 && it.hasNext()) it.next().closeConnection(); } } }
@Override public void closeConnections(int n) { if (!isRunning()) throw new IllegalStateException(); synchronized (clients) { Iterator<BlockingClient> it = clients.iterator(); while (n-- > 0 && it.hasNext()) it.next().closeConnection(); } } }
@Override public void closeConnections(int n) { if (!isRunning()) throw new IllegalStateException(); synchronized (clients) { Iterator<BlockingClient> it = clients.iterator(); while (n-- > 0 && it.hasNext()) it.next().closeConnection(); } } }
@Override public void closeConnections(int n) { if (!isRunning()) throw new IllegalStateException(); synchronized (clients) { Iterator<BlockingClient> it = clients.iterator(); while (n-- > 0 && it.hasNext()) it.next().closeConnection(); } } }