Sends a message to all connected clients except to the one with the given ID. @param message message @param client client ID @throws QueryException query exception
(final Item message, final String client)
| 74 | * @throws QueryException query exception |
| 75 | */ |
| 76 | public static void broadcast(final Item message, final String client) throws QueryException { |
| 77 | final List<WebSocket> list = new ArrayList<>(); |
| 78 | for(final Entry<String, WebSocket> entry : CLIENTS.entrySet()) { |
| 79 | if(!client.equals(entry.getKey())) list.add(entry.getValue()); |
| 80 | } |
| 81 | send(message, list); |
| 82 | } |
| 83 | |
| 84 | /** |
| 85 | * Sends a message to a specific clients. |