Package org.apache.sshd.scp.common
Class AbstractScpTransferEventListenerAdapter
- java.lang.Object
-
- org.apache.sshd.common.util.logging.AbstractLoggingBean
-
- org.apache.sshd.scp.common.AbstractScpTransferEventListenerAdapter
-
- All Implemented Interfaces:
java.util.EventListener
,SshdEventListener
,ScpTransferEventListener
public abstract class AbstractScpTransferEventListenerAdapter extends AbstractLoggingBean implements ScpTransferEventListener
A no-op implementation ofScpTransferEventListener
for those who wish to implement only a small number of methods. By default, all non-overridden methods simply log at TRACE level their invocation parameters
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.sshd.scp.common.ScpTransferEventListener
ScpTransferEventListener.FileOperation
-
-
Field Summary
-
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
-
Fields inherited from interface org.apache.sshd.scp.common.ScpTransferEventListener
EMPTY
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractScpTransferEventListenerAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
endFileEvent(Session session, ScpTransferEventListener.FileOperation op, java.nio.file.Path file, long length, java.util.Set<java.nio.file.attribute.PosixFilePermission> perms, java.lang.Throwable thrown)
void
endFolderEvent(Session session, ScpTransferEventListener.FileOperation op, java.nio.file.Path file, java.util.Set<java.nio.file.attribute.PosixFilePermission> perms, java.lang.Throwable thrown)
void
startFileEvent(Session session, ScpTransferEventListener.FileOperation op, java.nio.file.Path file, long length, java.util.Set<java.nio.file.attribute.PosixFilePermission> perms)
void
startFolderEvent(Session session, ScpTransferEventListener.FileOperation op, java.nio.file.Path file, java.util.Set<java.nio.file.attribute.PosixFilePermission> perms)
-
Methods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warn
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.sshd.scp.common.ScpTransferEventListener
handleFileEventAckInfo
-
-
-
-
Method Detail
-
startFileEvent
public void startFileEvent(Session session, ScpTransferEventListener.FileOperation op, java.nio.file.Path file, long length, java.util.Set<java.nio.file.attribute.PosixFilePermission> perms) throws java.io.IOException
- Specified by:
startFileEvent
in interfaceScpTransferEventListener
- 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:
java.io.IOException
- If failed to handle the event
-
endFileEvent
public void endFileEvent(Session session, ScpTransferEventListener.FileOperation op, java.nio.file.Path file, long length, java.util.Set<java.nio.file.attribute.PosixFilePermission> perms, java.lang.Throwable thrown) throws java.io.IOException
- Specified by:
endFileEvent
in interfaceScpTransferEventListener
- 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:
java.io.IOException
- If failed to handle the event
-
startFolderEvent
public void startFolderEvent(Session session, ScpTransferEventListener.FileOperation op, java.nio.file.Path file, java.util.Set<java.nio.file.attribute.PosixFilePermission> perms) throws java.io.IOException
- Specified by:
startFolderEvent
in interfaceScpTransferEventListener
- 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:
java.io.IOException
- If failed to handle the event
-
endFolderEvent
public void endFolderEvent(Session session, ScpTransferEventListener.FileOperation op, java.nio.file.Path file, java.util.Set<java.nio.file.attribute.PosixFilePermission> perms, java.lang.Throwable thrown) throws java.io.IOException
- Specified by:
endFolderEvent
in interfaceScpTransferEventListener
- 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:
java.io.IOException
- If failed to handle the event
-
-