public class scp extends java.lang.Object implements SshFileTransferListener, Logger
Logger.Level| Constructor and Description |
|---|
scp()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
finishedTransfer(java.lang.String path,
java.lang.String targetPath)
A file transfer has finished.
|
boolean |
isLevelEnabled(Logger.Level level)
Determine if messages at the specified log level will be displayed.
|
void |
log(Logger.Level level,
java.lang.String message)
Log a message at the specified level.
|
void |
log(Logger.Level level,
java.lang.String message,
java.lang.Throwable exception)
Log a message and an optional exception at the specified level.
|
static void |
main(java.lang.String[] args)
Entry point.
|
void |
start()
Start the command.
|
void |
startedTransfer(java.lang.String path,
java.lang.String targetPath,
long length)
A new file transfer has started.
|
void |
transferProgress(java.lang.String path,
java.lang.String targetPath,
long progress)
A file transfer has progressed.
|
public scp()
throws SshException
SshExceptionpublic void start()
throws SshException,
java.io.IOException
SshExceptionjava.io.IOExceptionpublic static void main(java.lang.String[] args)
throws SshException
args - command line argumentsSshExceptionpublic void startedTransfer(java.lang.String path,
java.lang.String targetPath,
long length)
SshFileTransferListenerstartedTransfer in interface SshFileTransferListenerpath - path of file (may be null if the source is
a stream)targetPath - path of file (may be null if the target is
a stream)length - total length of file (or -1 if not known)public void transferProgress(java.lang.String path,
java.lang.String targetPath,
long progress)
SshFileTransferListenertransferProgress in interface SshFileTransferListenerpath - path of file (may be null if the source is
a stream)targetPath - path of file (may be null if the target is
a stream)progress - number of bytes sent since the last progresspublic void finishedTransfer(java.lang.String path,
java.lang.String targetPath)
SshFileTransferListenerfinishedTransfer in interface SshFileTransferListenerpath - path of file (may be null if the source is
a stream)targetPath - path of file (may be null if the target is
a stream)public void log(Logger.Level level, java.lang.String message)
Loggerpublic void log(Logger.Level level, java.lang.String message, java.lang.Throwable exception)
Loggerpublic boolean isLevelEnabled(Logger.Level level)
LoggerisLevelEnabled in interface Loggerlevel - levelCopyright © 2018. All rights reserved.