public void run() {
    while (true) {
      try { // client.handle(streamIn.readUTF());
        // accept Serializable object
        Communication comm_temp = (Communication) streamInObject.readObject();

        client.handle(comm_temp.getMessage(), comm_temp.getProperty());
      } catch (IOException ioe) {
        System.out.println("Listening error: " + ioe.getMessage());
        client.stop();
      } catch (ClassNotFoundException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
    }
  }
Esempio n. 2
0
 // ______________________________________Méthode qui met à jour la liste des messages recues d'un
 // client
 public synchronized void updatemsgs(Communication com) throws RemoteException {
   C.update("[" + com.get_src() + "] : " + com.get_msg());
 }