Package org.apache.sshd.common.scp
Interface ScpTransferEventListener
-
- All Superinterfaces:
EventListener
,SshdEventListener
- All Known Implementing Classes:
AbstractScpTransferEventListenerAdapter
public interface ScpTransferEventListener extends SshdEventListener
Can be registered in order to receive events about SCP transfers- Author:
- Apache MINA SSHD Project
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ScpTransferEventListener.FileOperation
-
Field Summary
Fields Modifier and Type Field Description static ScpTransferEventListener
EMPTY
An "empty" implementation to be used instead ofnull
s
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description default void
endFileEvent(Session session, ScpTransferEventListener.FileOperation op, Path file, long length, Set<PosixFilePermission> perms, Throwable thrown)
default void
endFolderEvent(Session session, ScpTransferEventListener.FileOperation op, Path file, Set<PosixFilePermission> perms, Throwable thrown)
default void
startFileEvent(Session session, ScpTransferEventListener.FileOperation op, Path file, long length, Set<PosixFilePermission> perms)
default void
startFolderEvent(Session session, ScpTransferEventListener.FileOperation op, Path file, Set<PosixFilePermission> perms)
static <L extends ScpTransferEventListener>
LvalidateListener(L listener)
-
-
-
Field Detail
-
EMPTY
static final ScpTransferEventListener EMPTY
An "empty" implementation to be used instead ofnull
s
-
-
Method Detail
-
startFileEvent
default void startFileEvent(Session session, ScpTransferEventListener.FileOperation op, Path file, long length, Set<PosixFilePermission> perms) throws IOException
- Parameters:
session
- The client/serverSession
through which the transfer is being executedop
- TheScpTransferEventListener.FileOperation
file
- The local referenced filePath
length
- Size (in bytes) of transferred dataperms
- ASet
ofPosixFilePermission
s to be applied once transfer is complete- Throws:
IOException
- If failed to handle the event
-
endFileEvent
default void endFileEvent(Session session, ScpTransferEventListener.FileOperation op, Path file, long length, Set<PosixFilePermission> perms, Throwable thrown) throws IOException
- Parameters:
session
- The client/serverSession
through which the transfer is being executedop
- TheScpTransferEventListener.FileOperation
file
- The local referenced filePath
length
- Size (in bytes) of transferred dataperms
- ASet
ofPosixFilePermission
s to be applied once transfer is completethrown
- The result of the operation attempt - ifnull
then reception was successful- Throws:
IOException
- If failed to handle the event
-
startFolderEvent
default void startFolderEvent(Session session, ScpTransferEventListener.FileOperation op, Path file, Set<PosixFilePermission> perms) throws IOException
- Parameters:
session
- The client/serverSession
through which the transfer is being executedop
- TheScpTransferEventListener.FileOperation
file
- The local referenced folderPath
perms
- ASet
ofPosixFilePermission
s to be applied once transfer is complete- Throws:
IOException
- If failed to handle the event
-
endFolderEvent
default void endFolderEvent(Session session, ScpTransferEventListener.FileOperation op, Path file, Set<PosixFilePermission> perms, Throwable thrown) throws IOException
- Parameters:
session
- The client/serverSession
through which the transfer is being executedop
- TheScpTransferEventListener.FileOperation
file
- The local referenced filePath
perms
- ASet
ofPosixFilePermission
s to be applied once transfer is completethrown
- The result of the operation attempt - ifnull
then reception was successful- Throws:
IOException
- If failed to handle the event
-
validateListener
static <L extends ScpTransferEventListener> L validateListener(L listener)
-
-