feat: notify Membre update to ws client

This commit is contained in:
2024-01-25 22:43:25 +01:00
parent f604e64966
commit d84ec9e1b4
3 changed files with 58 additions and 1 deletions

View File

@@ -0,0 +1,24 @@
package fr.titionfire.ffsaf.net2.request;
import fr.titionfire.ffsaf.net2.Client_Thread;
import fr.titionfire.ffsaf.net2.data.SimpleClubModel;
import java.util.ArrayList;
public class SReqClub {
public static void sendIfNeed(ArrayList<Client_Thread> client_Thread, SimpleClubModel club) {
for (Client_Thread client : client_Thread) {
client.sendNotify(club, "sendClub");
}
}
public static void sendAddIfNeed(ArrayList<Client_Thread> client_Thread, SimpleClubModel club) {
for (Client_Thread client : client_Thread) {
client.sendNotify(club, "sendAddClub");
}
}
public static void sendRmIfNeed(ArrayList<Client_Thread> client_Thread, long club) {
for (Client_Thread client : client_Thread) {
client.sendNotify(club, "sendRmClub");
}
}
}

View File

@@ -0,0 +1,27 @@
package fr.titionfire.ffsaf.net2.request;
import fr.titionfire.ffsaf.net2.Client_Thread;
import fr.titionfire.ffsaf.net2.data.SimpleCombModel;
import java.util.ArrayList;
public class SReqComb {
public static void sendIfNeed(ArrayList<Client_Thread> client_Thread, SimpleCombModel comb) {
for (Client_Thread client : client_Thread) {
client.sendNotify(comb, "sendComb");
}
}
public static void sendIfNeedAdd(ArrayList<Client_Thread> client_Thread, SimpleCombModel comb) {
for (Client_Thread client : client_Thread) {
client.sendNotify(comb, "sendAddComb");
}
}
public static void sendRm(ArrayList<Client_Thread> client_Thread, long id) {
for (Client_Thread client : client_Thread) {
client.sendNotify(id, "sendRmComb");
}
}
}