/**
  * Returns the name of the listen thread.
  *
  * @return the thread name if in listening mode, otherwise <code>null</code>.
  * @since 1.6
  */
 public String getThreadName() {
   ServerThread st = server;
   if (st != null) {
     return st.getName();
   } else {
     return null;
   }
 }
Exemple #2
0
 public synchronized void sendList() throws IOException {
   ClientList l = new ClientList();
   for (ServerThread st : sList) {
     if (st.life() && st != null) l.add(st.getName());
   }
   for (ServerThread st : sList) {
     if (st.life() && st != null) st.getOut().writeObject(l);
   }
 }