クラス SftpRemoteFileTemplate

java.lang.ObjectSE
org.springframework.integration.file.remote.RemoteFileTemplate<org.apache.sshd.sftp.client.SftpClient.DirEntry>
org.springframework.integration.sftp.session.SftpRemoteFileTemplate
実装されたすべてのインターフェース:
AwareBeanFactoryAwareInitializingBeanRemoteFileOperations<org.apache.sshd.sftp.client.SftpClient.DirEntry>

public class SftpRemoteFileTemplate extends RemoteFileTemplate<org.apache.sshd.sftp.client.SftpClient.DirEntry>
基になる ChannelSftp オブジェクトへの型安全アクセスを提供する RemoteFileTemplate の SFTP バージョン。
導入:
4.1
作成者:
Gary Russell, Artem Bilan
  • フィールドの詳細

    • NOT_DIRTY_STATUSES

      protected static final ListSE<IntegerSE> NOT_DIRTY_STATUSES
  • コンストラクターの詳細

    • SftpRemoteFileTemplate

      public SftpRemoteFileTemplate(SessionFactory<org.apache.sshd.sftp.client.SftpClient.DirEntry> sessionFactory)
  • メソッドの詳細

    • executeWithClient

      public <T, C> T executeWithClient(ClientCallback<C,T> callback)
      インターフェースからコピーされた説明: RemoteFileOperations
      セッションのクライアントを取得した後、コールバックの doWithClient メソッドを実行し、低レベルのメソッドへのアクセスを提供します。メソッドの終了時に確実にセッションを閉じます。
      次で指定:
      インターフェース RemoteFileOperations<org.apache.sshd.sftp.client.SftpClient.DirEntry>executeWithClient 
      オーバーライド:
      クラス RemoteFileTemplate<org.apache.sshd.sftp.client.SftpClient.DirEntry>executeWithClient 
      型パラメーター:
      T - ClientCallback.doWithClient(Object) によって返される型。
      C - 基礎となるクライアントオブジェクトの型。
      パラメーター:
      callback - ClientCallback。
      戻り値:
      コールバックメソッドの結果。
    • doExecuteWithClient

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

      protected boolean shouldMarkSessionAsDirty(ExceptionSE ex)
      クラスからコピーされた説明: RemoteFileTemplate
      コールバックから例外がスローされたときに、RemoteFileTemplate.execute(SessionCallback)Session.dirty() を呼び出す必要があるかどうかを決定します。デフォルトでは、このメソッドは true を返します。リモートファイルプロトコル拡張機能は、このメソッドをオーバーライドして、スローされた例外に対する特定の戦略を提供できます。file not found エラーは、セッションが切断されたことを示す信号ではありません。
      オーバーライド:
      クラス RemoteFileTemplate<org.apache.sshd.sftp.client.SftpClient.DirEntry>shouldMarkSessionAsDirty 
      パラメーター:
      ex - Session をダーティとしてマークする必要があるかどうかをチェックする例外。
      戻り値:
      Session.dirty() を呼び出す必要がある場合は true。
    • isStatusDirty

      protected boolean isStatusDirty(int status)
      SftpException.getStatus() が致命的として扱われるかどうかを確認します。
      パラメーター:
      status - SftpException.getStatus() からの値。
      戻り値:
      SftpException.getStatus() が致命的として扱われる場合は true。
      導入:
      6.0.8