public void sendAlertToAllUsers(String Message) { try { ServerMessage Alert = new ServerMessage(Outconming.OldAlert); Alert.writeInt(1); Alert.writeUTF(Message); Iterator reader = getUserFromId.entrySet().iterator(); while (reader.hasNext()) { User nUser = (User) (((Map.Entry) reader.next()).getValue()); if (nUser.isOnline) Alert.Send(nUser.Session); } } catch (Exception e) { e.printStackTrace(); } }
public void sendCustomAlert( String Capition, String mAlert, String mAlert2, String LinkName, String Link, String What1) { ServerMessage Alert = new ServerMessage(Outconming.CustomAlert); Alert.writeUTF(Capition); Alert.writeUTF(mAlert); Alert.writeUTF(mAlert2); Alert.writeUTF(LinkName); Alert.writeUTF(Link); Alert.writeUTF(What1); Alert.Send(Session); }
public void sendAlert(String mAlert) { ServerMessage Alert = new ServerMessage(Outconming.IluminaAlert); Alert.writeUTF(mAlert); Alert.Send(Session); }