code: public void publishToAll(String message) {
  		StringBuffer buf = new StringBuffer(message);
  		synchronized (clientSessions) {
  			System.out.println("send message '" + message + "' to " + clientSessions.size() + " clients");
  
  			Iterator<Session> it = clientSessions.iterator();
  			while (it.hasNext()) {
  				Session session = it.next();
  				try {
  					session.getRemote().sendString(buf.toString());
  				} catch (IOException exception) {
  					clientSessions.remove(session);
  					it = clientSessions.iterator();
  					try {
  						session.close();
  					} catch (Exception e) {
  					}
  				}
  			}
  		}
  
  	}
docs: méthode qui envoie le message à tous les clients connectés
  
  @param message