ScpToMessage (Apache Ant API)
Keywords: org.apache.tools.ant.taskdefs.optional.ssh.ScpToMessage class

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tools.ant.taskdefs.optional.ssh
Class ScpToMessage

    java.lang.Object
      org.apache.tools.ant.taskdefs.optional.ssh.AbstractSshMessage
          org.apache.tools.ant.taskdefs.optional.ssh.ScpToMessage

Direct Known Subclasses:
  ScpToMessageBySftp

    public class ScpToMessage

extends AbstractSshMessage

Utility class to carry out an upload scp transfer.

Constructor Summary
`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.util.List aDirectoryList, java.lang.String aRemotePath)` 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.

Method Summary
`void` | `execute()` Carry out the transfer.
`java.io.File` | `getLocalFile()` Get the local file
`java.lang.String` | `getRemotePath()` Get the remote path

Methods inherited from class org.apache.tools.ant.taskdefs.optional.ssh.AbstractSshMessage
`getProgressMonitor, getVerbose, log, logStats, openExecChannel, openSftpChannel, sendAck, setLogListener, trackProgress, waitForAck`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

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,
                        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

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD