Package br.com.visualmidia.business

Examples of br.com.visualmidia.business.FileDescriptor


    } 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 {
            socket.close();
View Full Code Here


                               if(!ServerAdress.getServerAdress().equals(GDSystem.getServerIp()))
                                 communicate.sendObject(new Autentication((String) gd.get("username"), (String) gd.get("password"), (String) gd.get("serialnumber")));
                              
                                if(ServerAdress.getServerAdress().equals(GDSystem.getServerIp()) || communicate.receive().equals("312")) {
                                    while (communicate.receive().equals("303")) {
                                        final FileDescriptor fileDescriptor = (FileDescriptor) communicate.receiveObject();
       
                                        updateComposite.getDisplay().syncExec(new Runnable() {
                                            public void run() {
                                                secondMessageLabel.setText("Recebendo: " + fileDescriptor.getName());
                                                downloadStatus.setText("");
       
                                                fileBar.setMaximum(Integer.parseInt(String.valueOf(fileDescriptor.getSize())));
                                                fileBar.setSelection(0);
                                            }
                                        });
                                       
                                        communicate.send("309");
View Full Code Here

                            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")){
                                i--;
View Full Code Here

      imageData = null;
   
    else if(receive.equals("702")){
      try {
        String personId = communicate.receive();
        communicate.receiveFile((SSLSocket) communicate.getFileTransferConectionWaitMode(), new FileDescriptor("", personId + ".jpg", 0, 0), Constants.PHOTO_DIR);
      } catch (UnknownHostException e) {
        logger.error(e);
      } catch (IOException e) {
        logger.error(e);
      }
View Full Code Here

            IRunnableWithProgress progress = new IRunnableWithProgress() {
              public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
                  monitor.beginTask("Copiando Snapshot do Servidor. Aguarde...", IProgressMonitor.UNKNOWN);
                  monitor.subTask("Copiando arquivos.");
                     
                final FileDescriptor fileDescriptor = (FileDescriptor) communicate.receiveObject();
                communicate.send("309");
               
               
                if (communicate.receiveFile(fileDescriptor)) {
                  communicate.send("307");
View Full Code Here

              IRunnableWithProgress progress = new IRunnableWithProgress() {
                public void run(IProgressMonitor monitor) throws InvocationTargetException,
                InterruptedException {
                  monitor.beginTask("Atualizando o Gerente Digital. Aguarde...",IProgressMonitor.UNKNOWN);
                  while (communicate.receive().equals("303")) {
                    final FileDescriptor fileDescriptor = (FileDescriptor) communicate.receiveObject();
                    communicate.send("309");

                    if (communicate.receiveFile(fileDescriptor)) {
                      monitor.subTask("Copiando arquivo: "+ fileDescriptor.getName());
                      communicate.send("307");
                    } else {
                      communicate.send("308");
                    }
                  }
View Full Code Here

                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(), 0));

              if(communicate.receive().equals("309")) {
                communicate.sendFile(file);

                if(communicate.receive().equals("308")){
View Full Code Here

TOP

Related Classes of br.com.visualmidia.business.FileDescriptor

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.