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:
java.util.EventListener,NamedResource,SshdEventListener,SftpEventListener
public class SftpServerSubSystemEventListener extends ServerEventListenerHelper implements SftpEventListener
-
-
Field Summary
-
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
-
Fields inherited from interface org.apache.sshd.common.NamedResource
BY_NAME_COMPARATOR, NAME_EXTRACTOR
-
-
Constructor Summary
Constructors Constructor Description SftpServerSubSystemEventListener(org.slf4j.Logger logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreated(ServerSession session, java.nio.file.Path path, java.util.Map<java.lang.String,?> attrs, java.lang.Throwable thrown)Called 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, java.nio.file.Path srcPath, java.nio.file.Path dstPath, java.util.Collection<java.nio.file.CopyOption> opts, java.lang.Throwable thrown)Called after renaming a file / directoryvoidremoved(ServerSession session, java.nio.file.Path path, boolean isDirectory, java.lang.Throwable thrown)Called after a file has been removed-
Methods inherited from class org.apache.sshd.cli.server.helper.ServerEventListenerHelper
getName
-
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.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
-
-
-
-
Method Detail
-
initialized
public void initialized(ServerSession session, int version) throws java.io.IOException
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:
java.io.IOException- If failed to handle the call
-
destroying
public void destroying(ServerSession session) throws java.io.IOException
Description copied from interface:SftpEventListenerCalled when subsystem is destroyed since it was closed- Specified by:
destroyingin interfaceSftpEventListener- Parameters:
session- The associatedServerSession- Throws:
java.io.IOException- If failed to handle the call
-
created
public void created(ServerSession session, java.nio.file.Path path, java.util.Map<java.lang.String,?> attrs, java.lang.Throwable thrown) throws java.io.IOException
Description 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:
java.io.IOException- If failed to handle the call
-
moved
public void moved(ServerSession session, java.nio.file.Path srcPath, java.nio.file.Path dstPath, java.util.Collection<java.nio.file.CopyOption> opts, java.lang.Throwable thrown) throws java.io.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:
java.io.IOException- If failed to handle the call
-
removed
public void removed(ServerSession session, java.nio.file.Path path, boolean isDirectory, java.lang.Throwable thrown) throws java.io.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:
java.io.IOException- If failed to handle the call
-
-