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

Class AbstractSshMessage

Known Direct Subclasses:
ScpFromMessage, ScpToMessage

public abstract class AbstractSshMessage
extends java.lang.Object

Constructor Summary

AbstractSshMessage(Session session)
AbstractSshMessage(boolean verbose, Session session)

Method Summary

abstract void
execute()
protected boolean
getVerbose()
protected void
log(String message)
protected void
logStats(long timeStarted, long timeEnded, int totalLength)
protected Channel
openExecChannel(String command)
protected void
sendAck(OutputStream out)
void
setLogListener(LogListener aListener)
protected int
trackProgress(int filesize, int totalLength, int percentTransmitted)
protected void
waitForAck(InputStream in)
Reads the response, throws a BuildException if the response indicates an error.

Constructor Details

AbstractSshMessage

public AbstractSshMessage(Session session)

AbstractSshMessage

public AbstractSshMessage(boolean verbose,
                          Session session)
Since:
Ant 1.6.2

Method Details

execute

public abstract void execute()
            throws IOException,
                   JSchException

getVerbose

protected final boolean getVerbose()
Since:
Ant 1.6.2

log

protected void log(String message)

logStats

protected void logStats(long timeStarted,
                        long timeEnded,
                        int totalLength)

openExecChannel

protected Channel openExecChannel(String command)
            throws JSchException

sendAck

protected void sendAck(OutputStream out)
            throws IOException

setLogListener

public void setLogListener(LogListener aListener)

trackProgress

protected final int trackProgress(int filesize,
                                  int totalLength,
                                  int percentTransmitted)

waitForAck

protected void waitForAck(InputStream in)
            throws IOException,
                   BuildException
Reads the response, throws a BuildException if the response indicates an error.

Copyright © 2000-2006 Apache Software Foundation. All Rights Reserved.