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

Class ScpToMessage

Known Direct Subclasses:
ScpToMessageBySftp

public class ScpToMessage
extends AbstractSshMessage

Utility class to carry out an upload scp transfer.

Constructor Summary

ScpToMessage(Session session)
Constructor for ScpToMessage
ScpToMessage(Session session, File aLocalFile, String aRemotePath)
Constructor for ScpToMessage.
ScpToMessage(Session session, List aDirectoryList, String aRemotePath)
Constructor for ScpToMessage.
ScpToMessage(boolean verbose, Session session)
Constructor for ScpToMessage
ScpToMessage(boolean verbose, Session session, File aLocalFile, String aRemotePath)
Constructor for a local file to remote.
ScpToMessage(boolean verbose, Session session, List aDirectoryList, String aRemotePath)
Constructor for a local directories to remote.

Method Summary

void
execute()
Carry out the transfer.
File
getLocalFile()
Get the local file
String
getRemotePath()
Get the remote path

Methods inherited from class org.apache.tools.ant.taskdefs.optional.ssh.AbstractSshMessage

execute, getProgressMonitor, getVerbose, log, logStats, openExecChannel, openSftpChannel, sendAck, setLogListener, trackProgress, waitForAck

Constructor Details

ScpToMessage

public ScpToMessage(Session session)
Constructor for ScpToMessage
Parameters:
session - the ssh session to use

ScpToMessage

public ScpToMessage(Session session,
                    File aLocalFile,
                    String aRemotePath)
Constructor for ScpToMessage.
Parameters:
session - the scp session to use
aLocalFile - the local file
aRemotePath - the remote path

ScpToMessage

public ScpToMessage(Session session,
                    List aDirectoryList,
                    String aRemotePath)
Constructor for ScpToMessage.
Parameters:
session - the scp session to use
aDirectoryList - a list of directories
aRemotePath - the remote path

ScpToMessage

public ScpToMessage(boolean verbose,
                    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,
                    Session session,
                    File aLocalFile,
                    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,
                    Session session,
                    List aDirectoryList,
                    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

Method Details

execute

public void execute()
            throws IOException,
                   JSchException
Carry out the transfer.
Overrides:
execute in interface AbstractSshMessage

getLocalFile

public File getLocalFile()
Get the local file
Returns:
the local file

getRemotePath

public String getRemotePath()
Get the remote path
Returns:
the remote path