Class ApacheMinaSftpEventListener

java.lang.Object
org.springframework.integration.sftp.server.ApacheMinaSftpEventListener
All Implemented Interfaces:
EventListener, org.apache.sshd.common.util.SshdEventListener, org.apache.sshd.sftp.server.SftpEventListener, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationEventPublisherAware

public class ApacheMinaSftpEventListener extends Object implements org.apache.sshd.sftp.server.SftpEventListener, org.springframework.context.ApplicationEventPublisherAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean
A listener for SFTP events emitted by an Apache Mina sshd/sftp server. It emits selected events as Spring Framework ApplicationEvents which are subclasses of ApacheMinaSftpEvent.
Since:
5.2
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    created(org.apache.sshd.server.session.ServerSession session, Path path, Map<String,?> attrs, Throwable thrown)
     
    void
    destroying(org.apache.sshd.server.session.ServerSession session)
     
    protected org.springframework.context.ApplicationEventPublisher
     
     
    void
    initialized(org.apache.sshd.server.session.ServerSession session, int version)
     
    void
    moved(org.apache.sshd.server.session.ServerSession session, Path srcPath, Path dstPath, Collection<CopyOption> opts, Throwable thrown)
     
    void
    removed(org.apache.sshd.server.session.ServerSession session, Path path, boolean isDirectory, Throwable thrown)
     
    void
    setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
     
    void
     
     
    void
    written(org.apache.sshd.server.session.ServerSession session, String remoteHandle, org.apache.sshd.sftp.server.FileHandle localHandle, long offset, byte[] data, int dataOffset, int dataLen, Throwable thrown)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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
  • Constructor Details

    • ApacheMinaSftpEventListener

      public ApacheMinaSftpEventListener()
  • Method Details

    • setApplicationEventPublisher

      public void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
      Specified by:
      setApplicationEventPublisher in interface org.springframework.context.ApplicationEventPublisherAware
    • getApplicationEventPublisher

      protected org.springframework.context.ApplicationEventPublisher getApplicationEventPublisher()
    • setBeanName

      public void setBeanName(String name)
      Specified by:
      setBeanName in interface org.springframework.beans.factory.BeanNameAware
    • getBeanName

      public String getBeanName()
    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
    • initialized

      public void initialized(org.apache.sshd.server.session.ServerSession session, int version)
      Specified by:
      initialized in interface org.apache.sshd.sftp.server.SftpEventListener
    • destroying

      public void destroying(org.apache.sshd.server.session.ServerSession session)
      Specified by:
      destroying in interface org.apache.sshd.sftp.server.SftpEventListener
    • created

      public void created(org.apache.sshd.server.session.ServerSession session, Path path, Map<String,?> attrs, Throwable thrown)
      Specified by:
      created in interface org.apache.sshd.sftp.server.SftpEventListener
    • removed

      public void removed(org.apache.sshd.server.session.ServerSession session, Path path, boolean isDirectory, Throwable thrown)
      Specified by:
      removed in interface org.apache.sshd.sftp.server.SftpEventListener
    • written

      public void written(org.apache.sshd.server.session.ServerSession session, String remoteHandle, org.apache.sshd.sftp.server.FileHandle localHandle, long offset, byte[] data, int dataOffset, int dataLen, Throwable thrown)
      Specified by:
      written in interface org.apache.sshd.sftp.server.SftpEventListener
    • moved

      public void moved(org.apache.sshd.server.session.ServerSession session, Path srcPath, Path dstPath, Collection<CopyOption> opts, Throwable thrown)
      Specified by:
      moved in interface org.apache.sshd.sftp.server.SftpEventListener
    • toString

      public String toString()
      Overrides:
      toString in class Object