Examples of upload()


Examples of net.schmizz.sshj.xfer.scp.SCPFileTransfer.upload()

     SSHSecurityContext securityContext = (SSHSecurityContext)context.getSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT);
     SCPFileTransfer fileTransfer = securityContext.getSSHClient().newSCPFileTransfer();
     String remoteFile = app.getInputDataDirectory() + File.separatorChar + paramValue;

     File inputFile = new File(paramValue);
     fileTransfer.upload(inputFile.getAbsolutePath(), remoteFile);
     return remoteFile;
   }
}
View Full Code Here

Examples of net.schmizz.sshj.xfer.scp.SCPFileTransfer.upload()

    String remoteFile = app.getStaticWorkingDirectory() + File.separatorChar + Constants.EXECUTABLE_NAME;
    log.info(remoteFile);
    try {
      File runscript = createShellScript(jobExecutionContext);
      SCPFileTransfer fileTransfer = securityContext.getSSHClient().newSCPFileTransfer();
      fileTransfer.upload(runscript.getAbsolutePath(), remoteFile);
    } catch (IOException e) {
      throw new GFacProviderException(e.getLocalizedMessage(), e);
    }
  }
View Full Code Here

Examples of net.schmizz.sshj.xfer.scp.SCPFileTransfer.upload()

     SSHSecurityContext securityContext = (SSHSecurityContext)context.getSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT);
     SCPFileTransfer fileTransfer = securityContext.getSSHClient().newSCPFileTransfer();
     String remoteFile = app.getInputDataDirectory() + File.separatorChar + paramValue;

     File inputFile = new File(paramValue);
     fileTransfer.upload(inputFile.getAbsolutePath(), remoteFile);
     return remoteFile;
   }

    public void initProperties(Map<String, String> properties) throws GFacHandlerException, GFacException {
View Full Code Here

Examples of net.schmizz.sshj.xfer.scp.SCPFileTransfer.upload()

    log.info(remoteFile);
    try {
      File runscript = createShellScript(jobExecutionContext);
      SCPFileTransfer fileTransfer = securityContext.getSSHClient().newSCPFileTransfer();
      GFacUtils.updateApplicationJobStatus(jobExecutionContext, jobID, ApplicationJobStatus.STAGING);
      fileTransfer.upload(runscript.getAbsolutePath(), remoteFile);
    } catch (IOException e) {
      throw new GFacProviderException(e.getLocalizedMessage(), e);
    }
  }
View Full Code Here

Examples of net.schmizz.sshj.xfer.scp.SCPFileTransfer.upload()

     SSHSecurityContext securityContext = (SSHSecurityContext)context.getSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT);
     SCPFileTransfer fileTransfer = securityContext.getSSHClient().newSCPFileTransfer();
     String remoteFile = app.getInputDataDirectory() + File.separatorChar + paramValue;

     File inputFile = new File(paramValue);
     fileTransfer.upload(inputFile.getAbsolutePath(), remoteFile);
     return remoteFile;
   }

    public void initProperties(Map<String, String> properties) throws GFacHandlerException, GFacException {
View Full Code Here

Examples of net.schmizz.sshj.xfer.scp.SCPFileTransfer.upload()

    log.info(remoteFile);
    try {
      File runscript = createShellScript(jobExecutionContext);
      SCPFileTransfer fileTransfer = securityContext.getSSHClient().newSCPFileTransfer();
      GFacUtils.updateApplicationJobStatus(jobExecutionContext, jobID, ApplicationJobStatus.STAGING);
      fileTransfer.upload(runscript.getAbsolutePath(), remoteFile);
    } catch (IOException e) {
      throw new GFacProviderException(e.getLocalizedMessage(), e);
    }
  }
View Full Code Here

Examples of net.sf.jftp.net.FtpConnection.upload()

    catch(Exception ex) { ex.printStackTrace(); }
  }

  con.chdir(dir);

  con.upload(file);
}

public static void main(String argv[])
{
    if(argv.length == 3)
View Full Code Here

Examples of org.apache.ace.bnd.repository.AceObrRepository.upload()

        try {
            input = new FileInputStream(file);
            if (m_deploymentRepo instanceof AceObrRepository) {
                // ACE OBR can handle non-bundle resources if we pass a correct filename
                AceObrRepository aceToRepo = (AceObrRepository) m_deploymentRepo;
                aceToRepo.upload(input, getFileName(resource, snapshotVersion), getMimetype(resource));
            }
            else {
                m_deploymentRepo.put(input, null);
            }
            m_deploymentRepo.reset();
View Full Code Here

Examples of org.apache.karaf.cave.server.api.CaveRepository.upload()

    public void uploadArtifact(String repository, String artifactUrl, boolean generateObr) throws Exception {
        if (getCaveRepositoryService().getRepository(repository) != null) {
            throw new IllegalArgumentException("Cave repository " + repository + " doesn't exist");
        }
        CaveRepository caveRepository = getCaveRepositoryService().getRepository(repository);
        caveRepository.upload(new URL(artifactUrl));
        if (generateObr) {
            getCaveRepositoryService().install(repository);
        }
    }
View Full Code Here

Examples of org.apache.sshd.client.ScpClient.upload()

        assertTrue(root.exists());


        writeFile(new File("target/scp/local/out.txt"), data);
        new File(root, "remote").mkdirs();
        scp.upload(new File("target/scp/local/out.txt").getAbsolutePath(), "/" + new File("target/scp/remote/out.txt").getAbsolutePath().replace(File.separatorChar, '/'));
        assertFileLength(new File("target/scp/remote/out.txt"), data.length(), 5000);
        scp.upload(new File("target/scp/local/out.txt").getAbsolutePath(), new File("target/scp/remote/out2.txt").getAbsolutePath());
        assertFileLength(new File("target/scp/remote/out2.txt"), data.length(), 5000);
    }
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.