protoj.lang.internal.ant
Class ScpTask

java.lang.Object
  extended by protoj.lang.internal.ant.ScpTask

public final class ScpTask
extends java.lang.Object

A convenience class for performing a secure copy. Use the constructors to specify the minimal and most widely anticipated configuration and the initXXX methods for the less common configuration options.

Author:
Ashley Williams

Constructor Summary
ScpTask(java.lang.String toDir, java.io.File localFile)
          Please consult the man page for scp for information about these parameters.
ScpTask(java.lang.String user, java.lang.String host, java.io.File localFile, java.lang.String dest)
          Please consult the man page for scp for information about these parameters.
 
Method Summary
 void execute()
           
 org.apache.tools.ant.taskdefs.optional.ssh.Scp getScp()
          The underlying ant task.
 void initKeyAuthentication(java.lang.String passphrase, java.lang.String keyFile)
          Call this method to when using key authentication.
 void initLogging(java.io.File logFile)
          Enables logging to the specified log file at Project.MSG_INFO level.
 void initPasswordAuthentication(java.lang.String password)
          Call this method when using simple password authentication.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScpTask

public ScpTask(java.lang.String user,
               java.lang.String host,
               java.io.File localFile,
               java.lang.String dest)
Please consult the man page for scp for information about these parameters.

Parameters:
user -
host -
localFile -
dest -

ScpTask

public ScpTask(java.lang.String toDir,
               java.io.File localFile)
Please consult the man page for scp for information about these parameters.

Parameters:
toDir -
localFile -
Method Detail

initLogging

public void initLogging(java.io.File logFile)
Enables logging to the specified log file at Project.MSG_INFO level.

Parameters:
logFile -

initKeyAuthentication

public void initKeyAuthentication(java.lang.String passphrase,
                                  java.lang.String keyFile)
Call this method to when using key authentication.

Parameters:
passphrase -
keyFile -

initPasswordAuthentication

public void initPasswordAuthentication(java.lang.String password)
Call this method when using simple password authentication.

Parameters:
password -

getScp

public org.apache.tools.ant.taskdefs.optional.ssh.Scp getScp()
The underlying ant task.

Returns:

execute

public void execute()