Package client

Examples of client.ClientChat


    System.out.println("Création d'un nouveau client...");
   
    InterfaceClientChat client = null;
   
    try {
      client = new ClientChat(Constantes.SERVER, Constantes.PORT, s) {
       
        @Override
        public void afficherMessage(Message message) throws RemoteException {
          System.out.println("\n\n" + message.toString() + "\n");
          System.out.print("Destinataire : ");
View Full Code Here


     
      //simulation connexion
      profilClient = (ProfilSocial) Client.connexion("dalleria", "tarek");
     
      //creation tchat
      ClientChat client_chat = new ClientChat(Constantes.SERVER, Constantes.PORT,"dalleria") {
       
        @Override
        public void afficherMessage(Message message) throws RemoteException {
          JOptionPane.showMessageDialog(null, message.getTexte());
        }
      };
      client_chat.connexion();
     
      // simu ajout ami - bidirectionnel
      Client.addFriend(profilClient.getPseudo(), Client.getProfil("kev").getPseudo());
     
      refreshProfilClient(); // maj
     
      // ajout pub
      Publication pub = new Publication("kev", "Salut t nivo sur TalkToTarek ?!");
      Client.publier(profilClient.getPseudo(), pub)// sav ?
     
      refreshProfilClient();
     
      //Client.modifyProfil("dalleria", profilClient); // serial ?!

      //ajout comm et cie   
      boolean reussi = Client.commenter(pub, new Commentaire("dalleria", "haha oui si nivo mdr kivin !"), "kev"); // serial ? !
      pub.dislike("kev"); // no serial aqui !
      pub.like("dalleria"); // no serial aqui !
     
      System.out.println(reussi);
           
      refreshProfilClient();
     
      afficherPublications(profilClient);
     
      System.out.println();

     
      afficherAmis(profilClient); // kevin en theorie ?
     
      System.out.println();
     
      // simu creation de groupe
      Client.newGroup(new Groupe("TarekMiage"));
      Client.joinGroup(profilClient.getPseudo(), "TarekMiage");
      Client.joinGroup("kev", "TarekMiage");
     
      //simu pubi groupe
      Client.publierGroupe("TarekMiage", new Publication("dalleria", "j'ai dur !"));   
     
     
     
     
      refreshProfilClient();

      afficherProfil(profilClient);
     
      System.out.println();

     
      ClientChat client_chat2 = new ClientChat(Constantes.SERVER, Constantes.PORT,"kev") {
       
        @Override
        public void afficherMessage(Message message) throws RemoteException {
          JOptionPane.showMessageDialog(null, message.getTexte());
        }
      };
      client_chat2.connexion();
      System.out.println();



     
      refreshProfilClient();
      System.out.println();

      afficherGroupeTarek();
     
      refreshProfilClient();
     
     
      //simulation deco tchat
      client_chat2.deconnexion();
      client_chat.deconnexion();
     
      System.out.println();

      System.exit(0);// buter moi !!!
View Full Code Here

TOP

Related Classes of client.ClientChat

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.