Пример #1
0
 public String[] getUserList() throws RemoteException {
   Vector<String> res = new Vector<String>();
   for (ChatUser CU : userstable.values()) {
     res.add(CU.getName());
   }
   return res.toArray(new String[] {});
 }
Пример #2
0
 public void leaveUser(ChatUser u) throws RemoteException {
   if (userstable.containsKey(u.getName())) {
     userstable.remove(u.getName());
     broadcastLeaving(u.getName());
   }
 }
Пример #3
0
 public void joinUser(ChatUser u) throws java.rmi.RemoteException {
   if (!userstable.containsKey(u.getName())) {
     userstable.put(u.getName(), u);
     broadcastJoining(u.getName());
   }
 }