Class ScpFromMessage

java.lang.Object
org.apache.tools.ant.taskdefs.optional.ssh.AbstractSshMessage
org.apache.tools.ant.taskdefs.optional.ssh.ScpFromMessage
Direct Known Subclasses:
ScpFromMessageBySftp

public class ScpFromMessage
extends AbstractSshMessage
A helper object representing an scp download.
  • Constructor Summary

    Constructors 
    Constructor Description
    ScpFromMessage​(boolean verbose, com.jcraft.jsch.Session session)
    Constructor for ScpFromMessage
    ScpFromMessage​(boolean verbose, com.jcraft.jsch.Session session, java.lang.String aRemoteFile, java.io.File aLocalFile, boolean recursive)
    Constructor for ScpFromMessage.
    ScpFromMessage​(boolean verbose, com.jcraft.jsch.Session session, java.lang.String aRemoteFile, java.io.File aLocalFile, boolean recursive, boolean preserveLastModified)
    Constructor for ScpFromMessage.
    ScpFromMessage​(boolean verbose, com.jcraft.jsch.Session session, java.lang.String aRemoteFile, java.io.File aLocalFile, boolean recursive, boolean preserveLastModified, boolean compressed)
    Constructor for ScpFromMessage.
    ScpFromMessage​(com.jcraft.jsch.Session session)
    Constructor for ScpFromMessage
    ScpFromMessage​(com.jcraft.jsch.Session session, java.lang.String aRemoteFile, java.io.File aLocalFile, boolean recursive)
    Constructor for ScpFromMessage.
  • Method Summary

    Modifier and Type Method Description
    void execute()
    Carry out the transfer.
    protected boolean getPreserveLastModified()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ScpFromMessage

      public ScpFromMessage​(com.jcraft.jsch.Session session)
      Constructor for ScpFromMessage
      Parameters:
      session - the ssh session to use
    • ScpFromMessage

      public ScpFromMessage​(boolean verbose, com.jcraft.jsch.Session session)
      Constructor for ScpFromMessage
      Parameters:
      verbose - if true do verbose logging
      session - the ssh session to use
      Since:
      Ant 1.7
    • ScpFromMessage

      public ScpFromMessage​(boolean verbose, com.jcraft.jsch.Session session, java.lang.String aRemoteFile, java.io.File aLocalFile, boolean recursive)
      Constructor for ScpFromMessage.
      Parameters:
      verbose - if true log extra information
      session - the Scp session to use
      aRemoteFile - the remote file name
      aLocalFile - the local file
      recursive - if true use recursion (-r option to scp)
      Since:
      Ant 1.6.2
    • ScpFromMessage

      public ScpFromMessage​(com.jcraft.jsch.Session session, java.lang.String aRemoteFile, java.io.File aLocalFile, boolean recursive)
      Constructor for ScpFromMessage.
      Parameters:
      session - the Scp session to use
      aRemoteFile - the remote file name
      aLocalFile - the local file
      recursive - if true use recursion (-r option to scp)
    • ScpFromMessage

      public ScpFromMessage​(boolean verbose, com.jcraft.jsch.Session session, java.lang.String aRemoteFile, java.io.File aLocalFile, boolean recursive, boolean preserveLastModified)
      Constructor for ScpFromMessage.
      Parameters:
      verbose - if true log extra information
      session - the Scp session to use
      aRemoteFile - the remote file name
      aLocalFile - the local file
      recursive - if true use recursion (-r option to scp)
      preserveLastModified - whether to preserve file modification times
      Since:
      Ant 1.8.0
    • ScpFromMessage

      public ScpFromMessage​(boolean verbose, com.jcraft.jsch.Session session, java.lang.String aRemoteFile, java.io.File aLocalFile, boolean recursive, boolean preserveLastModified, boolean compressed)
      Constructor for ScpFromMessage.
      Parameters:
      verbose - if true log extra information
      session - the Scp session to use
      aRemoteFile - the remote file name
      aLocalFile - the local file
      recursive - if true use recursion (-r option to scp)
      preserveLastModified - whether to preserve file
      compressed - if true use compression (-C option to scp) modification times
      Since:
      Ant 1.9.8
  • Method Details

    • execute

      public void execute() throws java.io.IOException, com.jcraft.jsch.JSchException
      Carry out the transfer.
      Specified by:
      execute in class AbstractSshMessage
      Throws:
      java.io.IOException - on i/o errors
      com.jcraft.jsch.JSchException - on errors detected by scp
    • getPreserveLastModified

      protected boolean getPreserveLastModified()