private CopyOnWriteArrayList<CometCallback> clients = new CopyOnWriteArrayList<CometCallback>();
@Override
public void postMessage(String user, String message) {
for (CometCallback callback : new ArrayList<CometCallback>(clients)) {
Status status = callback.sendMessage(user + ": " + message);
if (status == Status.CLIENT_DISCONNECTED) {
clients.remove(callback);
}
}
}