Package br.com.visualmidia.core.server

Examples of br.com.visualmidia.core.server.Communicate.send()


                        if(socket.isClosed()) {
                            return;
                        }
                        String fileRemotePath = getPath(update.getBuildId(), file.getPath(), file.getName());
                               
                        communicate.send("303, Vou te enviar um arquivo");
                        communicate.sendObject(new FileDescriptor(fileRemotePath, file.getName(), file.length(), Long.parseLong(update.getBuildId())));
                       
                        if(communicate.receive().equals("309")) {
                          communicate.sendFile(file);
                            if(communicate.receive().equals("308")){
View Full Code Here


                                i--;
                            }
                        }
                    }
                }
                communicate.send("304");
            } else if(response.equals("306")) {
                communicate.sendObject(updateToBeMadeInTheCliente);
            }
        } else {
            communicate.send("301, Voc� est� atualizado!");
View Full Code Here

                communicate.send("304");
            } else if(response.equals("306")) {
                communicate.sendObject(updateToBeMadeInTheCliente);
            }
        } else {
            communicate.send("301, Voc� est� atualizado!");
        }
       
        try {
            socket.close();
        } catch (IOException e) {
View Full Code Here

        sslComunicationSocket = (SSLSocket) sslComunicationSocketFactory.createSocket(GDSystem.getServerIp(), 9998);

        Communicate communicate = new Communicate(sslComunicationSocket);
        communicate.receiveAndSend("200, Thank you bastard Photogroup");
        if (communicate.receive().equals("201")) {
          communicate.send("209, Troca de imagens");
          if (communicate.receive().equals("700")) {
            communicate.send("707, Apague a foto");
            communicate.send(id);
            if (communicate.receive().equals("708")) {
              sslComunicationSocket.close();
View Full Code Here

        Communicate communicate = new Communicate(sslComunicationSocket);
        communicate.receiveAndSend("200, Thank you bastard Photogroup");
        if (communicate.receive().equals("201")) {
          communicate.send("209, Troca de imagens");
          if (communicate.receive().equals("700")) {
            communicate.send("707, Apague a foto");
            communicate.send(id);
            if (communicate.receive().equals("708")) {
              sslComunicationSocket.close();
              personPhoto.fillPhotoFromPerson(id, true);
              createandsetMessageBoxPhoto("Foto excluida com sucesso");
View Full Code Here

        communicate.receiveAndSend("200, Thank you bastard Photogroup");
        if (communicate.receive().equals("201")) {
          communicate.send("209, Troca de imagens");
          if (communicate.receive().equals("700")) {
            communicate.send("707, Apague a foto");
            communicate.send(id);
            if (communicate.receive().equals("708")) {
              sslComunicationSocket.close();
              personPhoto.fillPhotoFromPerson(id, true);
              createandsetMessageBoxPhoto("Foto excluida com sucesso");
              removeImageButton.setEnabled(false);
View Full Code Here

       
        Communicate communicate = new Communicate(sslComunicationSocket);
       
        communicate.receiveAndSend("200, Thank you bastard Photogroup");
        if (communicate.receive().equals("201")) {
          communicate.send("209, Troca de imagens");
          if (communicate.receive().equals("700")) {
            communicate.send("701, me manda a imagem");
            communicate.send(personId);
            if (communicate.receive().equals("704")) {// imagem encontrada
              communicate.send("705, nao precisa me mandar imagem");
View Full Code Here

          fileName = fileStr;
        }
      }
    }
    if(newID == 0l) {
      communicate.send("301");
    } else {
      String location = Constants.DATA_FILES_PATH;
      file = new File(Constants.PREVAYLER_SERVER_DATA_DIRETORY  + Constants.FILE_SEPARATOR + fileName);
     
      communicate.send("303, Vou te enviar um arquivo");
View Full Code Here

      communicate.send("301");
    } else {
      String location = Constants.DATA_FILES_PATH;
      file = new File(Constants.PREVAYLER_SERVER_DATA_DIRETORY  + Constants.FILE_SEPARATOR + fileName);
     
      communicate.send("303, Vou te enviar um arquivo");
      communicate.sendObject(new FileDescriptor(location, fileName, file.length(), 0));
      communicate.sendFile(file);
    }
       
        try {
View Full Code Here

       
        communicate.receiveAndSend("200, Thank you bastard Photogroup");
        if (communicate.receive().equals("201")) {
          communicate.send("209, Troca de imagens");
          if (communicate.receive().equals("700")) {
            communicate.send("701, me manda a imagem");
            communicate.send(personId);
            if (communicate.receive().equals("704")) {// imagem encontrada
              communicate.send("705, nao precisa me mandar imagem");
              sslComunicationSocket.close();
              return true;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.