org.apache.tools.ant.taskdefs.optional.ssh

Class ScpToMessage

    • Constructor Summary

      Constructors 
      Constructor and Description
      ScpToMessage(boolean verbose, boolean compressed, com.jcraft.jsch.Session session)
      Constructor for ScpToMessage
      ScpToMessage(boolean verbose, boolean compressed, com.jcraft.jsch.Session session, java.io.File aLocalFile, java.lang.String aRemotePath, boolean preserveLastModified)
      Constructor for a local file to remote.
      ScpToMessage(boolean verbose, boolean compressed, com.jcraft.jsch.Session session, java.util.List aDirectoryList, java.lang.String aRemotePath, boolean preserveLastModified)
      Constructor for a local directories to remote.
      ScpToMessage(boolean verbose, com.jcraft.jsch.Session session)
      Constructor for ScpToMessage
      ScpToMessage(boolean verbose, com.jcraft.jsch.Session session, java.io.File aLocalFile, java.lang.String aRemotePath)
      Constructor for a local file to remote.
      ScpToMessage(boolean verbose, com.jcraft.jsch.Session session, java.io.File aLocalFile, java.lang.String aRemotePath, boolean preserveLastModified)
      Constructor for a local file to remote.
      ScpToMessage(boolean verbose, com.jcraft.jsch.Session session, java.util.List aDirectoryList, java.lang.String aRemotePath)
      Constructor for a local directories to remote.
      ScpToMessage(boolean verbose, com.jcraft.jsch.Session session, java.util.List aDirectoryList, java.lang.String aRemotePath, boolean preserveLastModified)
      Constructor for a local directories to remote.
      ScpToMessage(com.jcraft.jsch.Session session)
      Constructor for ScpToMessage
      ScpToMessage(com.jcraft.jsch.Session session, java.io.File aLocalFile, java.lang.String aRemotePath)
      Constructor for ScpToMessage.
      ScpToMessage(com.jcraft.jsch.Session session, java.util.List aDirectoryList, java.lang.String aRemotePath)
      Constructor for ScpToMessage.
    • Constructor Detail

      • ScpToMessage

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

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

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

        public ScpToMessage(boolean verbose,
                            com.jcraft.jsch.Session session,
                            java.io.File aLocalFile,
                            java.lang.String aRemotePath,
                            boolean preserveLastModified)
        Constructor for a local file to remote.
        Parameters:
        verbose - if true do verbose logging
        session - the scp session to use
        aLocalFile - the local file
        aRemotePath - the remote path
        preserveLastModified - whether to preserve the last modified timestamps
        Since:
        Ant 1.9.7
      • ScpToMessage

        public ScpToMessage(boolean verbose,
                            boolean compressed,
                            com.jcraft.jsch.Session session,
                            java.io.File aLocalFile,
                            java.lang.String aRemotePath,
                            boolean preserveLastModified)
        Constructor for a local file to remote.
        Parameters:
        verbose - if true do verbose logging
        compressed - if true use compression
        session - the scp session to use
        aLocalFile - the local file
        aRemotePath - the remote path
        preserveLastModified - whether to preserve the last modified timestamps
        Since:
        Ant 1.9.8
      • ScpToMessage

        public ScpToMessage(boolean verbose,
                            com.jcraft.jsch.Session session,
                            java.util.List aDirectoryList,
                            java.lang.String aRemotePath,
                            boolean preserveLastModified)
        Constructor for a local directories to remote.
        Parameters:
        verbose - if true do verbose logging
        session - the scp session to use
        aDirectoryList - a list of directories
        aRemotePath - the remote path
        preserveLastModified - whether to preserve the last modified timestamps
        Since:
        Ant 1.9.7
      • ScpToMessage

        public ScpToMessage(boolean verbose,
                            boolean compressed,
                            com.jcraft.jsch.Session session,
                            java.util.List aDirectoryList,
                            java.lang.String aRemotePath,
                            boolean preserveLastModified)
        Constructor for a local directories to remote.
        Parameters:
        verbose - if true do verbose logging
        compressed - whether to use compression
        session - the scp session to use
        aDirectoryList - a list of directories
        aRemotePath - the remote path
        preserveLastModified - whether to preserve the last modified timestamps
        Since:
        Ant 1.9.8
      • ScpToMessage

        public ScpToMessage(boolean verbose,
                            com.jcraft.jsch.Session session,
                            java.io.File aLocalFile,
                            java.lang.String aRemotePath)
        Constructor for a local file to remote.
        Parameters:
        verbose - if true do verbose logging
        session - the scp session to use
        aLocalFile - the local file
        aRemotePath - the remote path
        Since:
        Ant 1.6.2
      • ScpToMessage

        public ScpToMessage(boolean verbose,
                            com.jcraft.jsch.Session session,
                            java.util.List aDirectoryList,
                            java.lang.String aRemotePath)
        Constructor for a local directories to remote.
        Parameters:
        verbose - if true do verbose logging
        session - the scp session to use
        aDirectoryList - a list of directories
        aRemotePath - the remote path
        Since:
        Ant 1.6.2
      • ScpToMessage

        public ScpToMessage(com.jcraft.jsch.Session session,
                            java.io.File aLocalFile,
                            java.lang.String aRemotePath)
        Constructor for ScpToMessage.
        Parameters:
        session - the scp session to use
        aLocalFile - the local file
        aRemotePath - the remote path
      • ScpToMessage

        public ScpToMessage(com.jcraft.jsch.Session session,
                            java.util.List aDirectoryList,
                            java.lang.String aRemotePath)
        Constructor for ScpToMessage.
        Parameters:
        session - the scp session to use
        aDirectoryList - a list of directories
        aRemotePath - the remote path
    • Method Detail

      • 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
      • getLocalFile

        public java.io.File getLocalFile()
        Get the local file
        Returns:
        the local file
      • getRemotePath

        public java.lang.String getRemotePath()
        Get the remote path
        Returns:
        the remote path
      • setFileMode

        public void setFileMode(int fileMode)
        Set the file mode, defaults to 0644.
        Parameters:
        fileMode - int
        Since:
        Ant 1.9.5
      • getFileMode

        public int getFileMode()
        Get the file mode.
        Returns:
        int
        Since:
        Ant 1.9.5
      • setDirMode

        public void setDirMode(int dirMode)
        Set the dir mode, defaults to 0755.
        Parameters:
        dirMode - int
        Since:
        Ant 1.9.5
      • getDirMode

        public int getDirMode()
        Get the dir mode.
        Returns:
        int
        Since:
        Ant 1.9.5
      • getPreserveLastModified

        public boolean getPreserveLastModified()
        Whether to preserve the last modified time.
        Returns:
        boolean
        Since:
        Ant 1.9.7