Examples of sendFile()


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

                               
                        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

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

      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();
        } catch (IOException e) {
View Full Code Here

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

              communicate.receiveAndSend("200, Thank you bastard");
              communicate.receiveAndSend("209, troca de imagens");
              communicate.send("702, vou te enviar uma imagem");
              communicate.send(logoName);
   
              communicate.sendFile(communicate.getFileTransferConectionConnectMode(GDSystem.getServerIp()), file);
              copyFileToPhotoFolder(file, logoName);
            } else {
              copyFileToPhotoFolder(file, logoName);
            }
          }
View Full Code Here

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

                Communicate communicate = new Communicate(sslComunicationSocket);
                communicate.receiveAndSend("200, Thank you bastard");
                communicate.receiveAndSend("209, troca de imagens");
                communicate.send("702, vou te enviar uma imagem");
                communicate.send(personId);
                communicate.sendFile(communicate.getFileTransferConectionConnectMode(GDSystem.getServerIp()), file);
              } else {
                copyFileToPhotoFolder(file, personId);
              }
            }
          } catch (Exception exception) {
View Full Code Here

Examples of com.slim.utils.SSHClientUtils.sendFile()

      logger.info("Creating directory " + remotePath + " ...");
      sshclient.sendShell("mkdir -p " + remotePath, remoteDirectory);

      logger.info("Moving " + localEarFile + " to " + remoteEarFile + " ...");
      sshclient.sendFile(localEarFile, remoteEarFile);

      logger.info("Moving " + localXmlFile + " to " + remoteXmlFile + " ...");
      sshclient.sendFile(localXmlFile, remoteXmlFile);

      StringBuilder commandDeploy = new StringBuilder();
View Full Code Here

Examples of com.slim.utils.SSHClientUtils.sendFile()

      logger.info("Moving " + localEarFile + " to " + remoteEarFile + " ...");
      sshclient.sendFile(localEarFile, remoteEarFile);

      logger.info("Moving " + localXmlFile + " to " + remoteXmlFile + " ...");
      sshclient.sendFile(localXmlFile, remoteXmlFile);

      StringBuilder commandDeploy = new StringBuilder();
      commandDeploy.append(CommandUtils.getRemoteAppManageBin()).append(" -deploy");
      commandDeploy.append(" -ear ").append(remoteEarFile);
      commandDeploy.append(" -deployconfig ").append(remoteXmlFile);
View Full Code Here

Examples of io.vertx.core.http.HttpServerResponse.sendFile()

      assertIllegalStateException(() -> resp.write(buff));
      assertIllegalStateException(() -> resp.write("foo"));
      assertIllegalStateException(() -> resp.write("foo", "UTF-8"));
      assertIllegalStateException(() -> resp.write(buff));
      assertIllegalStateException(() -> resp.writeQueueFull());
      assertIllegalStateException(() -> resp.sendFile("asokdasokd"));

      testComplete();
    });

    server.listen(onSuccess(s -> {
View Full Code Here

Examples of io.vertx.core.net.NetSocket.sendFile()

      assertTrue(ar.succeeded());
      client.connect(1234, "localhost", ar2 -> {
        assertTrue(ar2.succeeded());
        NetSocket sock = ar2.result();
        sock.handler(buf -> {
          sock.sendFile(file.getAbsolutePath());
        });
      });
    });

    await();
View Full Code Here

Examples of io.vertx.core.net.NetSocket.sendFile()

      assertTrue(ar.succeeded());
      client.connect(1234, "localhost", result -> {
        assertTrue(result.succeeded());
        NetSocket socket = result.result();
        try {
          socket.sendFile(fDir.getAbsolutePath().toString());
          // should throw exception and never hit the assert
          fail("Should throw exception");
        } catch (IllegalArgumentException e) {
          testComplete();
        }
View Full Code Here

Examples of net.kuujo.vertigo.io.FileSender.sendFile()

  public static class TestFileSender extends ComponentVerticle {
    @Override
    public void start() {
      FileSender sender = new FileSender(output.port("out"));
      sender.sendFile("src/test/resources/test.txt", new Handler<AsyncResult<Void>>() {
        @Override
        public void handle(AsyncResult<Void> result) {
          assertTrue(result.succeeded());
        }
      });
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.