public interface ScpTransferEventListener extends SshdEventListener
| Modifier and Type | Interface and Description |
|---|---|
static class |
ScpTransferEventListener.FileOperation |
| Modifier and Type | Field and Description |
|---|---|
static ScpTransferEventListener |
EMPTY
An "empty" implementation to be used instead of
nulls |
validateListenerstatic final ScpTransferEventListener EMPTY
nullsdefault void startFileEvent(Session session, ScpTransferEventListener.FileOperation op, Path file, long length, Set<PosixFilePermission> perms) throws IOException
session - The client/server Session through which the transfer is being executedop - The ScpTransferEventListener.FileOperationfile - The local referenced file Pathlength - Size (in bytes) of transferred dataperms - A Set of PosixFilePermissions to be applied once transfer is completeIOException - If failed to handle the eventdefault void endFileEvent(Session session, ScpTransferEventListener.FileOperation op, Path file, long length, Set<PosixFilePermission> perms, Throwable thrown) throws IOException
session - The client/server Session through which the transfer is being executedop - The ScpTransferEventListener.FileOperationfile - The local referenced file Pathlength - Size (in bytes) of transferred dataperms - A Set of PosixFilePermissions to be applied once transfer is completethrown - The result of the operation attempt - if null then reception was successfulIOException - If failed to handle the eventdefault void handleFileEventAckInfo(Session session, ScpTransferEventListener.FileOperation op, Path file, long length, Set<PosixFilePermission> perms, ScpAckInfo ackInfo) throws IOException
endFileEvent(Session, FileOperation, Path, long, Set, Throwable) if no exception was thrown
and the peer's ACK was successfully readsession - The client/server Session through which the transfer is being executedop - The ScpTransferEventListener.FileOperationfile - The local referenced file Pathlength - Size (in bytes) of transferred dataperms - A Set of PosixFilePermissions to be applied once transfer is completeackInfo - The ScpAckInfo received after a file transfer - before validating itIOException - If failed to handle the eventdefault void handleReceiveCommandAckInfo(Session session, String command, ScpAckInfo ackInfo) throws IOException
session - The client/server Session through which the transfer is being executedcommand - The raw command that was attemptedackInfo - The ScpAckInfo received after command execution - including if OK. By default it throws an ScpException if ERROR status
code, but the user is free to override this behavior (see
ScpClient download fails silently
when the remote files does not exist ) - including throwing an exception if OK status...IOException - If bad acknowledgmentdefault void startFolderEvent(Session session, ScpTransferEventListener.FileOperation op, Path file, Set<PosixFilePermission> perms) throws IOException
session - The client/server Session through which the transfer is being executedop - The ScpTransferEventListener.FileOperationfile - The local referenced folder Pathperms - A Set of PosixFilePermissions to be applied once transfer is completeIOException - If failed to handle the eventdefault void endFolderEvent(Session session, ScpTransferEventListener.FileOperation op, Path file, Set<PosixFilePermission> perms, Throwable thrown) throws IOException
session - The client/server Session through which the transfer is being executedop - The ScpTransferEventListener.FileOperationfile - The local referenced file Pathperms - A Set of PosixFilePermissions to be applied once transfer is completethrown - The result of the operation attempt - if null then reception was successfulIOException - If failed to handle the eventstatic <L extends ScpTransferEventListener> L validateListener(L listener)
Copyright © 2008–2025 The Apache Software Foundation. All rights reserved.