| java.lang.Object org.apache.tools.ant.taskdefs.optional.ssh.AbstractSshMessage
All known Subclasses: org.apache.tools.ant.taskdefs.optional.ssh.ScpToMessage, org.apache.tools.ant.taskdefs.optional.ssh.ScpFromMessage,
AbstractSshMessage | abstract public class AbstractSshMessage (Code) | | Abstract class for ssh upload and download
|
Method Summary | |
abstract public void | execute() Carry out the transfer. | protected SftpProgressMonitor | getProgressMonitor() Get the progress monitor. | final protected boolean | getVerbose() Is the verbose attribute set. | protected void | log(String message) Log a message to the log listener. | protected void | logStats(long timeStarted, long timeEnded, long totalLength) Log transfer stats to the log listener. | protected Channel | openExecChannel(String command) Open an ssh channel. | protected ChannelSftp | openSftpChannel() Open an ssh sftp channel. | protected void | sendAck(OutputStream out) Send an ack. | public void | setLogListener(LogListener aListener) Set a log listener. | final protected int | trackProgress(long filesize, long totalLength, int percentTransmitted) Track progress every 10% if 100kb < filesize < 1mb. | protected void | waitForAck(InputStream in) Reads the response, throws a BuildException if the response
indicates an error. |
AbstractSshMessage | public AbstractSshMessage(Session session)(Code) | | Constructor for AbstractSshMessage
Parameters: session - the ssh session to use |
AbstractSshMessage | public AbstractSshMessage(boolean verbose, Session session)(Code) | | Constructor for AbstractSshMessage
Parameters: verbose - if true do verbose logging Parameters: session - the ssh session to use since: Ant 1.6.2 |
execute | abstract public void execute() throws IOException, JSchException(Code) | | Carry out the transfer.
throws: IOException - on I/O errors throws: JSchException - on ssh errors |
getProgressMonitor | protected SftpProgressMonitor getProgressMonitor()(Code) | | Get the progress monitor.
the progress monitor. |
getVerbose | final protected boolean getVerbose()(Code) | | Is the verbose attribute set.
true if the verbose attribute is set since: Ant 1.6.2 |
log | protected void log(String message)(Code) | | Log a message to the log listener.
Parameters: message - the message to log |
logStats | protected void logStats(long timeStarted, long timeEnded, long totalLength)(Code) | | Log transfer stats to the log listener.
Parameters: timeStarted - the time started Parameters: timeEnded - the finishing time Parameters: totalLength - the total length |
openExecChannel | protected Channel openExecChannel(String command) throws JSchException(Code) | | Open an ssh channel.
Parameters: command - the command to use the channel throws: JSchException - on error |
openSftpChannel | protected ChannelSftp openSftpChannel() throws JSchException(Code) | | Open an ssh sftp channel.
the channel throws: JSchException - on error |
setLogListener | public void setLogListener(LogListener aListener)(Code) | | Set a log listener.
Parameters: aListener - the log listener |
trackProgress | final protected int trackProgress(long filesize, long totalLength, int percentTransmitted)(Code) | | Track progress every 10% if 100kb < filesize < 1mb. For larger
files track progress for every percent transmitted.
Parameters: filesize - the size of the file been transmitted Parameters: totalLength - the total transmission size Parameters: percentTransmitted - the current percent transmitted the percent that the file is of the total |
|
|