Class SftpRemoteFileTemplate

java.lang.Object
org.springframework.integration.file.remote.RemoteFileTemplate<org.apache.sshd.sftp.client.SftpClient.DirEntry>
org.springframework.integration.sftp.session.SftpRemoteFileTemplate
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean, org.springframework.integration.file.remote.RemoteFileOperations<org.apache.sshd.sftp.client.SftpClient.DirEntry>

public class SftpRemoteFileTemplate extends org.springframework.integration.file.remote.RemoteFileTemplate<org.apache.sshd.sftp.client.SftpClient.DirEntry>
SFTP version of RemoteFileTemplate providing type-safe access to the underlying ChannelSftp object.
Since:
4.1
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.springframework.integration.file.remote.RemoteFileOperations

    org.springframework.integration.file.remote.RemoteFileOperations.OperationsCallback<F extends Object,T extends Object>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final List<Integer>
     

    Fields inherited from class org.springframework.integration.file.remote.RemoteFileTemplate

    logger, sessionFactory
  • Constructor Summary

    Constructors
    Constructor
    Description
    SftpRemoteFileTemplate(org.springframework.integration.file.remote.session.SessionFactory<org.apache.sshd.sftp.client.SftpClient.DirEntry> sessionFactory)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected <T> T
    doExecuteWithClient(org.springframework.integration.file.remote.ClientCallback<org.apache.sshd.sftp.client.SftpClient,T> callback)
     
    <T, C> T
    executeWithClient(org.springframework.integration.file.remote.ClientCallback<C,T> callback)
     
    protected boolean
    isStatusDirty(int status)
    Check if SftpException.getStatus() is treated as fatal.
    protected boolean
     

    Methods inherited from class org.springframework.integration.file.remote.RemoteFileTemplate

    afterPropertiesSet, append, append, execute, exists, get, get, getDirectoryExpressionProcessor, getRemoteFileSeparator, getSession, getSessionFactory, getTemporaryFileSuffix, invoke, isUseTemporaryFileName, list, remove, rename, send, send, setAutoCreateDirectory, setBeanFactory, setCharset, setFileNameExpression, setFileNameGenerator, setRemoteDirectoryExpression, setRemoteFileSeparator, setTemporaryFileSuffix, setTemporaryRemoteDirectoryExpression, setUseTemporaryFileName

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • NOT_DIRTY_STATUSES

      protected static final List<Integer> NOT_DIRTY_STATUSES
  • Constructor Details

    • SftpRemoteFileTemplate

      public SftpRemoteFileTemplate(org.springframework.integration.file.remote.session.SessionFactory<org.apache.sshd.sftp.client.SftpClient.DirEntry> sessionFactory)
  • Method Details

    • executeWithClient

      public <T, C> T executeWithClient(org.springframework.integration.file.remote.ClientCallback<C,T> callback)
      Specified by:
      executeWithClient in interface org.springframework.integration.file.remote.RemoteFileOperations<org.apache.sshd.sftp.client.SftpClient.DirEntry>
      Overrides:
      executeWithClient in class org.springframework.integration.file.remote.RemoteFileTemplate<org.apache.sshd.sftp.client.SftpClient.DirEntry>
    • doExecuteWithClient

      protected <T> T doExecuteWithClient(org.springframework.integration.file.remote.ClientCallback<org.apache.sshd.sftp.client.SftpClient,T> callback)
    • shouldMarkSessionAsDirty

      protected boolean shouldMarkSessionAsDirty(Exception ex)
      Overrides:
      shouldMarkSessionAsDirty in class org.springframework.integration.file.remote.RemoteFileTemplate<org.apache.sshd.sftp.client.SftpClient.DirEntry>
    • isStatusDirty

      protected boolean isStatusDirty(int status)
      Check if SftpException.getStatus() is treated as fatal.
      Parameters:
      status - the value from SftpException.getStatus().
      Returns:
      true if SftpException.getStatus() is treated as fatal.
      Since:
      6.0.8