クラス FtpOutboundGateway
java.lang.ObjectSE
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.handler.MessageHandlerSupport
org.springframework.integration.handler.AbstractMessageHandler
org.springframework.integration.handler.AbstractMessageProducingHandler
org.springframework.integration.handler.AbstractReplyProducingMessageHandler
org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>
org.springframework.integration.ftp.gateway.FtpOutboundGateway
- 実装されたすべてのインターフェース:
org.reactivestreams.Subscriber<Message<?>>
、Aware
、BeanClassLoaderAware
、BeanFactoryAware
、BeanNameAware
、DisposableBean
、InitializingBean
、ApplicationContextAware
、Ordered
、ExpressionCapable
、Orderable
、MessageProducer
、HeaderPropagationAware
、IntegrationPattern
、NamedComponent
、IntegrationManagement
、TrackableComponent
、MessageHandler
、reactor.core.CoreSubscriber<Message<?>>
public class FtpOutboundGateway
extends AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>
FTP/FTPS 経由でリモートファイル操作を実行するための送信ゲートウェイ。
- 導入:
- 2.1
- 作成者:
- Gary Russell, Artem Bilan
ネストされたクラスのサマリー
クラス org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway から継承されたネストクラス / インターフェース
AbstractRemoteFileOutboundGateway.Command, AbstractRemoteFileOutboundGateway.Option
クラス org.springframework.integration.handler.AbstractReplyProducingMessageHandler から継承されたネストクラス / インターフェース
AbstractReplyProducingMessageHandler.RequestHandler
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたネストクラス / インターフェース
IntegrationManagement.ManagementOverrides
フィールドサマリー
クラス org.springframework.integration.handler.AbstractMessageProducingHandler から継承されたフィールド
messagingTemplate
クラス org.springframework.integration.context.IntegrationObjectSupport から継承されたフィールド
EXPRESSION_PARSER, logger
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたフィールド
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME
インターフェース org.springframework.core.Ordered から継承されたフィールド
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
コンストラクターのサマリー
コンストラクター説明FtpOutboundGateway
(RemoteFileTemplate<org.apache.commons.net.ftp.FTPFile> remoteFileTemplate, StringSE command) 提供されたリモートファイルテンプレートとコマンド('ls'、'nlst'、'put' または 'mput' )を使用してインスタンスを構築します。FtpOutboundGateway
(RemoteFileTemplate<org.apache.commons.net.ftp.FTPFile> remoteFileTemplate, StringSE command, StringSE expression) 指定されたリモートファイルテンプレート、コマンド( "ls"、"get" など)、ファイル名を決定する式を使用してインスタンスを構築します。FtpOutboundGateway
(RemoteFileTemplate<org.apache.commons.net.ftp.FTPFile> remoteFileTemplate, MessageSessionCallback<org.apache.commons.net.ftp.FTPFile, ?> messageSessionCallback) 提供されたリモートファイルテンプレートと、セッションで操作を実行するためのコールバックを使用してインスタンスを構築します。FtpOutboundGateway
(SessionFactory<org.apache.commons.net.ftp.FTPFile> sessionFactory, StringSE command) 提供されたセッションファクトリとコマンド('ls'、'nlst'、'put' または 'mput' )を使用してインスタンスを構築します。FtpOutboundGateway
(SessionFactory<org.apache.commons.net.ftp.FTPFile> sessionFactory, StringSE command, StringSE expression) 指定されたセッションファクトリ、コマンド( "ls"、"get" など)、ファイル名を決定する式を使用してインスタンスを構築します。FtpOutboundGateway
(SessionFactory<org.apache.commons.net.ftp.FTPFile> sessionFactory, MessageSessionCallback<org.apache.commons.net.ftp.FTPFile, ?> messageSessionCallback) 提供されたセッションファクトリとセッションで操作を実行するためのコールバックを使用してインスタンスを構築します。メソッドのサマリー
修飾子と型メソッド説明protected ListSE<AbstractFileInfo<org.apache.commons.net.ftp.FTPFile>>
asFileInfoList
(CollectionSE<org.apache.commons.net.ftp.FTPFile> files) protected void
doChmod
(RemoteFileOperations<org.apache.commons.net.ftp.FTPFile> remoteFileOperations, StringSE path, int chmod) 転送後にリモートファイルでモードを設定します。デフォルトの実装は何もしません。protected void
doInit()
protected org.apache.commons.net.ftp.FTPFile
enhanceNameWithSubDirectory
(org.apache.commons.net.ftp.FTPFile file, StringSE directory) protected FileSE
get
(Message<?> message, Session<org.apache.commons.net.ftp.FTPFile> session, StringSE remoteDir, StringSE remoteFilePath, StringSE remoteFilename, org.apache.commons.net.ftp.FTPFile fileInfoParam) リモートファイルを構成済みのローカルディレクトリにコピーします。サブクラスはこのメソッドを実装して、コンポーネント型情報を提供できます。protected StringSE
getFilename
(org.apache.commons.net.ftp.FTPFile file) protected StringSE
getFilename
(AbstractFileInfo<org.apache.commons.net.ftp.FTPFile> file) protected long
getModified
(org.apache.commons.net.ftp.FTPFile file) boolean
protected boolean
isDirectory
(org.apache.commons.net.ftp.FTPFile file) protected boolean
isLink
(org.apache.commons.net.ftp.FTPFile file) protected ListSE<?>
リモートファイルをローカル表現にリストします。mGet
(Message<?> message, Session<org.apache.commons.net.ftp.FTPFile> session, StringSE remoteDirectory, StringSE remoteFilename) 提供されたディレクトリからリモートサーバーにファイルを再帰的に配置します。protected boolean
mv
(Message<?> message, Session<org.apache.commons.net.ftp.FTPFile> session, StringSE remoteFilePath, StringSE remoteFileNewPath) リモートパスを別のパスに移動します。指定されたディレクトリのリモートファイル名を一覧表示します。protected StringSE
メッセージに基づいてファイルをリモートサーバーに書き込みます。protected boolean
rm
(Message<?> message, Session<org.apache.commons.net.ftp.FTPFile> session, StringSE remoteFilePath) 指定されたパスに対してリモート削除を実行します。void
setWorkingDirExpression
(Expression workingDirExpression) Expression
を指定して、リクエストメッセージに対して FTP クライアントの作業ディレクトリを評価します。void
setWorkingDirExpressionString
(StringSE workingDirExpression) SpELExpression
を指定して、リクエストメッセージに対して FTP クライアントの作業ディレクトリを評価します。クラス org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway から継承されたメソッド
assertRemoteFileTemplateMutability, filterFile, filterFiles, filterMputFiles, getFullFileName, getRemoteFilename, getRemoteFileTemplate, handleRequestMessage, purgeDots, purgeLinks, remoteFileTemplateExplicitlySet, setAutoCreateDirectory, setAutoCreateLocalDirectory, setCharset, setChmod, setChmodOctal, setFileExistsMode, setFileNameExpression, setFileNameGenerator, setFilter, setLocalDirectory, setLocalDirectoryExpression, setLocalDirectoryExpressionString, setLocalFilenameGeneratorExpression, setLocalFilenameGeneratorExpressionString, setMputFilter, setOption, setOptions, setRemoteDirectoryExpression, setRemoteFileSeparator, setRenameExpression, setRenameExpressionString, setTemporaryFileSuffix, setTemporaryRemoteDirectoryExpression, setUseTemporaryFileName
クラス org.springframework.integration.handler.AbstractReplyProducingMessageHandler から継承されたメソッド
doInvokeAdvisedRequestHandler, getBeanClassLoader, getIntegrationPatternType, getRequiresReply, handleMessageInternal, hasAdviceChain, onInit, setAdviceChain, setBeanClassLoader, setRequiresReply
クラス org.springframework.integration.handler.AbstractMessageProducingHandler から継承されたメソッド
addNotPropagatedHeaders, createOutputMessage, getNotPropagatedHeaders, getOutputChannel, isAsync, messageBuilderForReply, produceOutput, resolveErrorChannel, sendErrorMessage, sendOutput, sendOutputs, setAsync, setNotPropagatedHeaders, setOutputChannel, setOutputChannelName, setSendTimeout, setupMessageProcessor, shouldCopyRequestHeaders, shouldSplitOutput, updateNotPropagatedHeaders
クラス org.springframework.integration.handler.AbstractMessageHandler から継承されたメソッド
handleMessage, onComplete, onError, onNext, onSubscribe, setObservationConvention
クラス org.springframework.integration.handler.MessageHandlerSupport から継承されたメソッド
buildSendTimer, destroy, getManagedName, getManagedType, getMetricsCaptor, getObservationRegistry, getOrder, getOverrides, isLoggingEnabled, isObserved, registerMetricsCaptor, registerObservationRegistry, sendTimer, setLoggingEnabled, setManagedName, setManagedType, setOrder, setShouldTrack, shouldTrack
クラス org.springframework.integration.context.IntegrationObjectSupport から継承されたメソッド
afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toString
クラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, wait, waitSE, waitSE
インターフェース reactor.core.CoreSubscriber から継承されたメソッド
currentContext
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたメソッド
getThisAs
インターフェース org.springframework.integration.support.context.NamedComponent から継承されたメソッド
getBeanName, getComponentName
コンストラクターの詳細
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, StringSE expression) 指定されたセッションファクトリ、コマンド( "ls"、"get" など)、ファイル名を決定する式を使用してインスタンスを構築します。- パラメーター:
sessionFactory
- セッションファクトリ。command
- コマンド。expression
- ファイル名式。
FtpOutboundGateway
public FtpOutboundGateway(RemoteFileTemplate<org.apache.commons.net.ftp.FTPFile> remoteFileTemplate, StringSE command, 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
- コマンド。- 導入:
- 4.3
FtpOutboundGateway
public FtpOutboundGateway(RemoteFileTemplate<org.apache.commons.net.ftp.FTPFile> remoteFileTemplate, StringSE command) 提供されたリモートファイルテンプレートとコマンド('ls'、'nlst'、'put' または 'mput' )を使用してインスタンスを構築します。remoteDirectory
式は、null
であり、FTP クライアントからworkingDirectory
を使用することを想定しています。- パラメーター:
remoteFileTemplate
- リモートファイルテンプレート。command
- コマンド。- 導入:
- 4.3
メソッドの詳細
setWorkingDirExpression
Expression
を指定して、リクエストメッセージに対して FTP クライアントの作業ディレクトリを評価します。- パラメーター:
workingDirExpression
- 作業ディレクトリを評価する式- 導入:
- 5.0
setWorkingDirExpressionString
SpELExpression
を指定して、リクエストメッセージに対して FTP クライアントの作業ディレクトリを評価します。- パラメーター:
workingDirExpression
- 作業ディレクトリを評価する SpEL 式- 導入:
- 5.0
getComponentType
クラスからコピーされた説明:IntegrationObjectSupport
サブクラスはこのメソッドを実装して、コンポーネント型情報を提供できます。- 次で指定:
- インターフェース
NamedComponent
のgetComponentType
- オーバーライド:
- クラス
MessageHandlerSupport
のgetComponentType
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
- 次で指定:
- クラス
AbstractRemoteFileOutboundGateway<org.apache.commons.net.ftp.FTPFile>
のgetFilename
getFilename
- 次で指定:
- クラス
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, 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, 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, StringSE remoteDir, StringSE remoteFilePath, StringSE remoteFilename, 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, 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。