public class ScpFromMessage extends AbstractSshMessage
Constructor and Description |
---|
ScpFromMessage(boolean verbose,
com.jcraft.jsch.Session session)
Constructor for ScpFromMessage
|
ScpFromMessage(boolean verbose,
com.jcraft.jsch.Session session,
java.lang.String aRemoteFile,
java.io.File aLocalFile,
boolean recursive)
Constructor for ScpFromMessage.
|
ScpFromMessage(boolean verbose,
com.jcraft.jsch.Session session,
java.lang.String aRemoteFile,
java.io.File aLocalFile,
boolean recursive,
boolean preserveLastModified)
Constructor for ScpFromMessage.
|
ScpFromMessage(boolean verbose,
com.jcraft.jsch.Session session,
java.lang.String aRemoteFile,
java.io.File aLocalFile,
boolean recursive,
boolean preserveLastModified,
boolean compressed)
Constructor for ScpFromMessage.
|
ScpFromMessage(com.jcraft.jsch.Session session)
Constructor for ScpFromMessage
|
ScpFromMessage(com.jcraft.jsch.Session session,
java.lang.String aRemoteFile,
java.io.File aLocalFile,
boolean recursive)
Constructor for ScpFromMessage.
|
Modifier and Type | Method and Description |
---|---|
void |
execute()
Carry out the transfer.
|
protected boolean |
getPreserveLastModified() |
getCompressed, getProgressMonitor, getVerbose, log, logStats, openExecChannel, openSftpChannel, sendAck, setLogListener, trackProgress, waitForAck
public ScpFromMessage(com.jcraft.jsch.Session session)
session
- the ssh session to usepublic ScpFromMessage(boolean verbose, com.jcraft.jsch.Session session)
verbose
- if true do verbose loggingsession
- the ssh session to usepublic ScpFromMessage(boolean verbose, com.jcraft.jsch.Session session, java.lang.String aRemoteFile, java.io.File aLocalFile, boolean recursive)
verbose
- if true log extra informationsession
- the Scp session to useaRemoteFile
- the remote file nameaLocalFile
- the local filerecursive
- if true use recursion (-r option to scp)public ScpFromMessage(com.jcraft.jsch.Session session, java.lang.String aRemoteFile, java.io.File aLocalFile, boolean recursive)
session
- the Scp session to useaRemoteFile
- the remote file nameaLocalFile
- the local filerecursive
- if true use recursion (-r option to scp)public ScpFromMessage(boolean verbose, com.jcraft.jsch.Session session, java.lang.String aRemoteFile, java.io.File aLocalFile, boolean recursive, boolean preserveLastModified)
verbose
- if true log extra informationsession
- the Scp session to useaRemoteFile
- the remote file nameaLocalFile
- the local filerecursive
- if true use recursion (-r option to scp)preserveLastModified
- whether to preserve file
modification timespublic ScpFromMessage(boolean verbose, com.jcraft.jsch.Session session, java.lang.String aRemoteFile, java.io.File aLocalFile, boolean recursive, boolean preserveLastModified, boolean compressed)
verbose
- if true log extra informationsession
- the Scp session to useaRemoteFile
- the remote file nameaLocalFile
- the local filerecursive
- if true use recursion (-r option to scp)preserveLastModified
- whether to preserve filecompressed
- if true use compression (-C option to scp)
modification timespublic void execute() throws java.io.IOException, com.jcraft.jsch.JSchException
execute
in class AbstractSshMessage
java.io.IOException
- on i/o errorscom.jcraft.jsch.JSchException
- on errors detected by scpprotected boolean getPreserveLastModified()