クラス FtpOutboundGateway

実装されているすべてのインターフェース:
org.reactivestreams.Subscriber<Message<?>>AwareBeanClassLoaderAwareBeanFactoryAwareBeanNameAwareDisposableBeanInitializingBeanApplicationContextAwareOrderedComponentSourceAwareExpressionCapableOrderableMessageProducerHeaderPropagationAwareIntegrationPatternNamedComponentIntegrationManagementTrackableComponentMessageHandlerreactor.core.CoreSubscriber<Message<?>>
既知の直属サブクラス
FtpOutboundGateway

public class FtpOutboundGateway extends AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>
FTP/FTPS 経由でリモートファイル操作を実行するための送信ゲートウェイ。
導入:
7.0
作成者:
Gary Russell, Artem Bilan
  • コンストラクターの詳細

    • FtpOutboundGateway

      public FtpOutboundGateway(SessionFactory<org.apache.commons.net.ftp.FTPFile> sessionFactory, MessageSessionCallback<org.apache.commons.net.ftp.FTPFile, ?> messageSessionCallback)
      提供されたセッションファクトリとセッションで操作を実行するためのコールバックを使用してインスタンスを構築します。
      パラメーター:
      sessionFactory - セッションファクトリ。
      messageSessionCallback - コールバック。
    • FtpOutboundGateway

      public FtpOutboundGateway(RemoteFileTemplate<org.apache.commons.net.ftp.FTPFile> remoteFileTemplate, MessageSessionCallback<org.apache.commons.net.ftp.FTPFile, ?> messageSessionCallback)
      提供されたリモートファイルテンプレートと、セッションで操作を実行するためのコールバックを使用してインスタンスを構築します。
      パラメーター:
      remoteFileTemplate - リモートファイルテンプレート。
      messageSessionCallback - コールバック。
    • FtpOutboundGateway

      public FtpOutboundGateway(SessionFactory<org.apache.commons.net.ftp.FTPFile> sessionFactory, StringSE command, @Nullable StringSE expression)
      提供されたセッションファクトリ、コマンド ( "ls"、"get" など)、リモートパスを決定する式を使用してインスタンスを構築します。
      パラメーター:
      sessionFactory - セッションファクトリ。
      command - コマンド。
      expression - リモートパス式。
    • FtpOutboundGateway

      public FtpOutboundGateway(RemoteFileTemplate<org.apache.commons.net.ftp.FTPFile> remoteFileTemplate, StringSE command, @Nullable StringSE expression)
      提供された リモートファイルテンプレート、コマンド ('ls'、'get' など)、リモートパスを決定する式を使用してインスタンスを構築します。
      パラメーター:
      remoteFileTemplate - リモートファイルテンプレート。
      command - コマンド。
      expression - リモートパス式。
    • FtpOutboundGateway

      public FtpOutboundGateway(SessionFactory<org.apache.commons.net.ftp.FTPFile> sessionFactory, StringSE command)
      提供されたセッションファクトリとコマンド('ls'、'nlst'、'put' または 'mput' )を使用してインスタンスを構築します。

      remoteDirectory 式は、null であり、FTP クライアントから workingDirectory を使用することを想定しています。

      パラメーター:
      sessionFactory - セッションファクトリ。
      command - コマンド。
    • FtpOutboundGateway

      public FtpOutboundGateway(RemoteFileTemplate<org.apache.commons.net.ftp.FTPFile> remoteFileTemplate, StringSE command)
      提供されたリモートファイルテンプレートとコマンド('ls'、'nlst'、'put' または 'mput' )を使用してインスタンスを構築します。

      remoteDirectory 式は、null であり、FTP クライアントから workingDirectory を使用することを想定しています。

      パラメーター:
      remoteFileTemplate - リモートファイルテンプレート。
      command - コマンド。
  • メソッドの詳細

    • setWorkingDirExpression

      public void setWorkingDirExpression(Expression workingDirExpression)
      Expression を指定して、リクエストメッセージに対して FTP クライアントの作業ディレクトリを評価します。
      パラメーター:
      workingDirExpression - 作業ディレクトリを評価する式
    • setWorkingDirExpressionString

      public void setWorkingDirExpressionString(StringSE workingDirExpression)
      SpEL Expression を指定して、リクエストメッセージに対して FTP クライアントの作業ディレクトリを評価します。
      パラメーター:
      workingDirExpression - 作業ディレクトリを評価する SpEL 式
    • getComponentType

      public StringSE getComponentType()
      次で指定:
      インターフェース NamedComponentgetComponentType 
      オーバーライド:
      クラス MessageHandlerSupportgetComponentType 
    • isDirectory

      protected boolean isDirectory(org.apache.commons.net.ftp.FTPFile file)
      次で指定:
      クラス AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>isDirectory 
    • isLink

      protected boolean isLink(org.apache.commons.net.ftp.FTPFile file)
      次で指定:
      クラス AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>isLink 
    • getFilename

      protected StringSE getFilename(org.apache.commons.net.ftp.FTPFile file)
      次で指定:
      クラス AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>getFilename 
    • getFilename

      protected StringSE getFilename(AbstractFileInfo<org.apache.commons.net.ftp.FTPFile> file)
      次で指定:
      クラス AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>getFilename 
    • getModified

      protected long getModified(org.apache.commons.net.ftp.FTPFile file)
      次で指定:
      クラス AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>getModified 
    • asFileInfoList

      protected ListSE<AbstractFileInfo<org.apache.commons.net.ftp.FTPFile>> asFileInfoList(CollectionSE<org.apache.commons.net.ftp.FTPFile> files)
      次で指定:
      クラス AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>asFileInfoList 
    • doInit

      protected void doInit()
      オーバーライド:
      クラス AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>doInit 
    • enhanceNameWithSubDirectory

      protected org.apache.commons.net.ftp.FTPFile enhanceNameWithSubDirectory(org.apache.commons.net.ftp.FTPFile file, StringSE directory)
      次で指定:
      クラス AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>enhanceNameWithSubDirectory 
    • ls

      protected ListSE<?> ls(Message<?> message, Session<org.apache.commons.net.ftp.FTPFile> session, @Nullable StringSE dir) throws IOExceptionSE
      クラスからコピーされた説明: AbstractRemoteFileOutboundGateway
      リモートファイルをローカル表現にリストします。現在のリクエストのコンテキストについては、メッセージを参照できます。デフォルトの実装では使用されません。
      オーバーライド:
      クラス AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>ls 
      パラメーター:
      message - リストリクエストに関連するメッセージ
      session - list コマンドを実行するセッション
      dir - コンテンツをリストするリモートディレクトリ
      戻り値:
      リモートファイルのリスト
      例外:
      IOExceptionSE - リモートコマンドの実行中の IO 例外
    • nlst

      protected ListSE<StringSE> nlst(Message<?> message, Session<org.apache.commons.net.ftp.FTPFile> session, @Nullable StringSE dir) throws IOExceptionSE
      クラスからコピーされた説明: AbstractRemoteFileOutboundGateway
      指定されたディレクトリのリモートファイル名を一覧表示します。メッセージは、現在のリクエストに関連するいくつかのコンテキストについて調べることができます。デフォルトの実装では使用されません。
      オーバーライド:
      クラス AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>nlst 
      パラメーター:
      message - 現在のリクエストに関連するメッセージ
      session - list file names コマンドを実行するセッション
      dir - ファイル名をリストするリモートディレクトリ
      戻り値:
      指定されたディレクトリ内のファイル / ディレクトリ名のリスト
      例外:
      IOExceptionSE - リモートコマンドの実行中の IO 例外
    • get

      protected FileSE get(Message<?> message, Session<org.apache.commons.net.ftp.FTPFile> session, @Nullable StringSE remoteDir, StringSE remoteFilePath, StringSE remoteFilename, @Nullable org.apache.commons.net.ftp.FTPFile fileInfoParam) throws IOExceptionSE
      クラスからコピーされた説明: AbstractRemoteFileOutboundGateway
      リモートファイルを構成済みのローカルディレクトリにコピーします。
      オーバーライド:
      クラス AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>get 
      パラメーター:
      message - メッセージ。
      session - セッション。
      remoteDir - リモートディレクトリ。
      remoteFilePath - リモートファイルのパス。
      remoteFilename - リモートファイル名。
      fileInfoParam - リモートファイル情報。null の場合、最初に "ls" コマンドを実行します。
      戻り値:
      ファイル。
      例外:
      IOExceptionSE - IOException。
    • mGet

      protected ListSE<FileSE> mGet(Message<?> message, Session<org.apache.commons.net.ftp.FTPFile> session, StringSE remoteDirectory, StringSE remoteFilename) throws IOExceptionSE
      オーバーライド:
      クラス AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>mGet 
      例外:
      IOExceptionSE
    • rm

      protected boolean rm(Message<?> message, Session<org.apache.commons.net.ftp.FTPFile> session, StringSE remoteFilePath) throws IOExceptionSE
      クラスからコピーされた説明: AbstractRemoteFileOutboundGateway
      指定されたパスに対してリモート削除を実行します。メッセージを参照して、コンテキストを判別できます。デフォルトの実装では使用されません。
      オーバーライド:
      クラス AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>rm 
      パラメーター:
      message - 削除するパスに関連するリクエストメッセージ
      session - 削除コマンドを実行するためのリモートプロトコルセッション
      remoteFilePath - 削除するリモートパス
      戻り値:
      リモート削除の結果として true または false
      例外:
      IOExceptionSE - リモートコマンドの実行中の IO 例外
    • mv

      protected boolean mv(Message<?> message, Session<org.apache.commons.net.ftp.FTPFile> session, StringSE remoteFilePath, StringSE remoteFileNewPath) throws IOExceptionSE
      クラスからコピーされた説明: AbstractRemoteFileOutboundGateway
      リモートパスを別のパスに移動します。メッセージを参照して、コンテキストを判別できます。デフォルトの実装では使用されません。
      オーバーライド:
      クラス AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>mv 
      パラメーター:
      message - この移動コマンドに関連するリクエストメッセージ
      session - 移動コマンドを実行するためのリモートプロトコルセッション
      remoteFilePath - ソースリモートパス
      remoteFileNewPath - ターゲットリモートパス
      戻り値:
      操作の結果として true または false
      例外:
      IOExceptionSE - リモートコマンドの実行中の IO 例外
    • put

      protected StringSE put(Message<?> message, Session<org.apache.commons.net.ftp.FTPFile> session, @Nullable StringSE subDirectory)
      クラスからコピーされた説明: AbstractRemoteFileOutboundGateway
      メッセージに基づいてファイルをリモートサーバーに書き込みます。メッセージを参照して、コンテキストを判別できます。セッション引数は、デフォルトの実装では使用されません。
      オーバーライド:
      クラス AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>put 
      パラメーター:
      message - この put コマンドに関連するリクエストメッセージ
      session - この呼び出しコンテキストに関連するリモートプロトコルセッション
      subDirectory - 配置するターゲットのサブディレクトリ
      戻り値:
      リモートパス。ローカルファイルが見つからなかった場合は null。
    • mPut

      protected ListSE<StringSE> mPut(Message<?> message, Session<org.apache.commons.net.ftp.FTPFile> session, FileSE localDir)
      クラスからコピーされた説明: AbstractRemoteFileOutboundGateway
      提供されたディレクトリからリモートサーバーにファイルを再帰的に配置します。メッセージを参照して、コンテキストを判別できます。セッション引数は、デフォルトの実装では使用されません。
      オーバーライド:
      クラス AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>mPut 
      パラメーター:
      message - この mPut コマンドに関連するリクエストメッセージ
      session - この呼び出しコンテキストのリモートプロトコルセッション
      localDir - サーバーに出力するローカルディレクトリ
      戻り値:
      送信されたファイルのリモートパスのリスト
    • isChmodCapable

      public boolean isChmodCapable()
      オーバーライド:
      クラス AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>isChmodCapable 
    • doChmod

      protected void doChmod(RemoteFileOperations<org.apache.commons.net.ftp.FTPFile> remoteFileOperations, StringSE path, int chmod)
      クラスからコピーされた説明: AbstractRemoteFileOutboundGateway
      転送後にリモートファイルでモードを設定します。デフォルトの実装は何もしません。
      オーバーライド:
      クラス AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>doChmod 
      パラメーター:
      remoteFileOperations - リモートファイルテンプレート。
      path - パス。
      chmod - 設定する chmod。