Class SftpServerSubSystemEventListener
java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.cli.server.helper.ServerEventListenerHelper
org.apache.sshd.cli.server.helper.SftpServerSubSystemEventListener
- All Implemented Interfaces:
EventListener,NamedResource,SshdEventListener,SftpEventListener
public class SftpServerSubSystemEventListener
extends ServerEventListenerHelper
implements SftpEventListener
-
Field Summary
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
logFields inherited from interface org.apache.sshd.common.NamedResource
BY_NAME_COMPARATOR, NAME_EXTRACTOR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled after creating a directoryvoiddestroying(ServerSession session) Called when subsystem is destroyed since it was closedvoidinitialized(ServerSession session, int version) Called when the SFTP protocol has been initializedvoidmoved(ServerSession session, Path srcPath, Path dstPath, Collection<CopyOption> opts, Throwable thrown) Called after renaming a file / directoryvoidremoved(ServerSession session, Path path, boolean isDirectory, Throwable thrown) Called after a file has been removedMethods inherited from class org.apache.sshd.cli.server.helper.ServerEventListenerHelper
getNameMethods 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, warnMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.sshd.sftp.server.SftpEventListener
blocked, blocking, closed, closing, creating, exiting, linked, linking, modifiedAttributes, modifyingAttributes, moving, open, openFailed, opening, read, readEntries, reading, readingEntries, received, receivedExtension, removing, unblocked, unblocking, writing, written
-
Constructor Details
-
SftpServerSubSystemEventListener
public SftpServerSubSystemEventListener(org.slf4j.Logger logger)
-
-
Method Details
-
initialized
Description copied from interface:SftpEventListenerCalled when the SFTP protocol has been initialized- Specified by:
initializedin interfaceSftpEventListener- Parameters:
session- TheServerSessionthrough which the request was handledversion- The negotiated SFTP version- Throws:
IOException- If failed to handle the call
-
destroying
Description copied from interface:SftpEventListenerCalled when subsystem is destroyed since it was closed- Specified by:
destroyingin interfaceSftpEventListener- Parameters:
session- The associatedServerSession- Throws:
IOException- If failed to handle the call
-
created
public void created(ServerSession session, Path path, Map<String, ?> attrs, Throwable thrown) throws IOExceptionDescription copied from interface:SftpEventListenerCalled after creating a directory- Specified by:
createdin interfaceSftpEventListener- Parameters:
session- TheServerSessionthrough which the request was handledpath- DirectoryPathto be createdattrs- Requested associated attributes to setthrown- If not-nullthen the reason for the failure to execute- Throws:
IOException- If failed to handle the call
-
moved
public void moved(ServerSession session, Path srcPath, Path dstPath, Collection<CopyOption> opts, Throwable thrown) throws IOException Description copied from interface:SftpEventListenerCalled after renaming a file / directory- Specified by:
movedin interfaceSftpEventListener- Parameters:
session- TheServerSessionthrough which the request was handledsrcPath- The sourcePathdstPath- The targetPathopts- The resolved renaming optionsthrown- If not-nullthen the reason for the failure to execute- Throws:
IOException- If failed to handle the call
-
removed
public void removed(ServerSession session, Path path, boolean isDirectory, Throwable thrown) throws IOException Description copied from interface:SftpEventListenerCalled after a file has been removed- Specified by:
removedin interfaceSftpEventListener- Parameters:
session- TheServerSessionthrough which the request was handledpath- ThePathto be removedisDirectory- Whether this was a folder or a filethrown- If not-nullthen the reason for the failure to execute- Throws:
IOException- If failed to handle the call
-