public abstract class AbstractRemoteFileOutboundGateway<F> extends AbstractReplyProducingMessageHandler
修飾子と型 | クラスと説明 |
---|---|
static class | AbstractRemoteFileOutboundGateway.Command ゲートウェイでサポートされているコマンドの列挙。 |
static class | AbstractRemoteFileOutboundGateway.Option さまざまなコマンドでサポートされているオプションの列挙。 |
AbstractReplyProducingMessageHandler.RequestHandler
IntegrationManagement.ManagementOverrides
messagingTemplate
EXPRESSION_PARSER, logger
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME
コンストラクターと説明 |
---|
AbstractRemoteFileOutboundGateway(RemoteFileTemplate<F> remoteFileTemplate, AbstractRemoteFileOutboundGateway.Command command, StringSE expressionArg) 指定されたリモートファイルテンプレート、コマンド( "ls"、"get" など)、ファイル名を決定する式を使用してインスタンスを構築します。 |
AbstractRemoteFileOutboundGateway(RemoteFileTemplate<F> remoteFileTemplate, MessageSessionCallback<F,?> messageSessionCallback) 提供されたリモートファイルテンプレートと、セッションで操作を実行するためのコールバックを使用してインスタンスを構築します。 |
AbstractRemoteFileOutboundGateway(RemoteFileTemplate<F> remoteFileTemplate, StringSE command, StringSE expression) 指定されたリモートファイルテンプレート、コマンド( "ls"、"get" など)、ファイル名を決定する式を使用してインスタンスを構築します。 |
AbstractRemoteFileOutboundGateway(SessionFactory<F> sessionFactory, AbstractRemoteFileOutboundGateway.Command command, StringSE expression) 指定されたセッションファクトリ、コマンド( "ls"、"get" など)、ファイル名を決定する式を使用してインスタンスを構築します。 |
AbstractRemoteFileOutboundGateway(SessionFactory<F> sessionFactory, MessageSessionCallback<F,?> messageSessionCallback) 提供されたセッションファクトリとセッションで操作を実行するためのコールバックを使用してインスタンスを構築します。 |
AbstractRemoteFileOutboundGateway(SessionFactory<F> sessionFactory, StringSE command, StringSE expression) 指定されたセッションファクトリ、コマンド( "ls"、"get" など)、ファイル名を決定する式を使用してインスタンスを構築します。 |
修飾子と型 | メソッドと説明 |
---|---|
protected abstract ListSE<AbstractFileInfo<F>> | asFileInfoList(CollectionSE<F> files) |
protected void | assertRemoteFileTemplateMutability(StringSE propertyName) |
protected void | doChmod(RemoteFileOperations<F> remoteFileOperations, StringSE path, int chmodToSet) 転送後にリモートファイルでモードを設定します。デフォルトの実装は何もしません。 |
protected void | doInit() |
protected abstract F | enhanceNameWithSubDirectory(F file, StringSE directory) |
protected ListSE<F> | filterFiles(F[] files) |
protected ListSE<FileSE> | filterMputFiles(FileSE[] files) |
protected FileSE | get(Message<?> message, Session<F> session, StringSE remoteDir, StringSE remoteFilePath, StringSE remoteFilename, F fileInfoParam) リモートファイルを構成済みのローカルディレクトリにコピーします。 |
protected abstract StringSE | getFilename(AbstractFileInfo<F> file) |
protected abstract StringSE | getFilename(F file) |
protected abstract long | getModified(F file) |
protected StringSE | getRemoteFilename(StringSE remoteFilePath) |
protected RemoteFileTemplate<F> | getRemoteFileTemplate() |
protected ObjectSE | handleRequestMessage(Message<?> requestMessage) サブクラスはこのメソッドを実装して、リクエストメッセージを処理する必要があります。 |
boolean | isChmodCapable() |
protected abstract boolean | isDirectory(F file) |
protected abstract boolean | isLink(F file) |
protected ListSE<?> | ls(Message<?> message, Session<F> session, StringSE dir) リモートファイルをローカル表現にリストします。 |
protected ListSE<FileSE> | mGet(Message<?> message, Session<F> session, StringSE remoteDirectory, StringSE remoteFilename) |
protected ListSE<StringSE> | mPut(Message<?> message, Session<F> session, FileSE localDir) 提供されたディレクトリからリモートサーバーにファイルを再帰的に配置します。 |
protected boolean | mv(Message<?> message, Session<F> session, StringSE remoteFilePath, StringSE remoteFileNewPath) リモートパスを別のパスに移動します。 |
protected ListSE<StringSE> | nlst(Message<?> message, Session<F> session, StringSE dir) 指定されたディレクトリのリモートファイル名を一覧表示します。 |
protected void | purgeDots(ListSE<F> lsFiles) |
protected void | purgeLinks(ListSE<F> lsFiles) |
protected StringSE | put(Message<?> message, Session<F> session, StringSE subDirectory) メッセージに基づいてファイルをリモートサーバーに書き込みます。 |
protected void | remoteFileTemplateExplicitlySet(boolean remoteFileTemplateExplicitlySet) |
protected boolean | rm(Message<?> message, Session<F> session, StringSE remoteFilePath) 指定されたパスに対してリモート削除を実行します。 |
void | setAutoCreateDirectory(boolean autoCreateDirectory) ファイルをリモートシステムに送信するときに、リモートディレクトリを自動的に作成するかどうかを決定します。 |
void | setAutoCreateLocalDirectory(boolean autoCreateLocalDirectory) ローカルディレクトリを自動的に作成する必要があるかどうかを識別する boolean フラグ。 |
void | setCharset(StringSE charset) 文字列ペイロードをリモートファイルのコンテンツとしてバイトに変換するときに使用する文字セットを設定します。 |
void | setChmod(int chmod) アップロード後にファイルのアクセス許可を設定します。 |
void | setChmodOctal(StringSE chmod) Spring XML の利便性のためのストリング setter。 |
void | setFileExistsMode(FileExistsMode fileExistsMode) ファイルがすでにローカルに存在する場合に GET および MGET 操作を使用する場合、またはファイルがリモートシステムに存在する場合に PUT および MPUT を使用する場合に実行するアクションを決定します。 |
void | setFileNameExpression(Expression fileNameExpression) ファイル名の式を設定して、リモートファイルへの絶対パスを決定します。 |
void | setFileNameGenerator(FileNameGenerator fileNameGenerator) ファイルをリモートシステムに転送するときに使用されるリモートファイル名の生成に使用されるファイル名ジェネレーターを設定します。 |
void | setFilter(FileListFilter<F> filter) リモートファイルをフィルタリングするように FileListFilter を設定します。 |
void | setLocalDirectory(FileSE localDirectory) リモートファイルの転送先のディレクトリパスを指定します。 |
void | setLocalDirectoryExpression(Expression localDirectoryExpression) リモートファイルの転送先のディレクトリパスを評価する SpEL 式を指定します。 |
void | setLocalDirectoryExpressionString(StringSE localDirectoryExpression) リモートファイルの転送先のディレクトリパスを評価する SpEL 式を指定します。 |
void | setLocalFilenameGeneratorExpression(Expression localFilenameGeneratorExpression) ダウンロード後にローカルファイルの名前を変更するための SpEL 式を指定します。 |
void | setLocalFilenameGeneratorExpressionString(StringSE localFilenameGeneratorExpression) ダウンロード後にローカルファイルの名前を変更するための SpEL 式を指定します。 |
void | setMputFilter(FileListFilter<FileSE> filter) MPUT コマンドの使用時にローカルファイルシステムビューに対して実行される FileListFilter 。 |
void | setOption(AbstractRemoteFileOutboundGateway.Option... options) さまざまなゲートウェイコマンドのオプションの配列を指定します。 |
void | setOptions(StringSE options) さまざまなゲートウェイコマンドのオプションをスペース区切りの文字列として指定します。 |
void | setRemoteDirectoryExpression(Expression remoteDirectoryExpression) ファイルの送信先となるリモートディレクトリの判別に使用されるリモートディレクトリ式を設定します。 |
void | setRemoteFileSeparator(StringSE remoteFileSeparator) リモートファイルを処理するときにファイル区切り文字を設定します。デフォルト '/'。 |
void | setRenameExpression(Expression renameExpression) 転送中にファイル名を変更するための SpEL 式を指定します。 |
void | setRenameExpressionString(StringSE renameExpression) 転送中にファイル名を変更するための SpEL 式を指定します。 |
void | setTemporaryFileSuffix(StringSE temporaryFileSuffix) ファイルをリモートシステムに転送するときに使用する一時的なサフィックスを設定します。 |
void | setTemporaryRemoteDirectoryExpression(Expression temporaryRemoteDirectoryExpression) 一時的なリモートディレクトリ式を設定します。ファイルをリモートシステムに転送するときに使用されます。 |
void | setUseTemporaryFileName(boolean useTemporaryFileName) リモートシステムにファイルを送信するときに一時ファイル名を使用するかどうかを設定します。 |
doInvokeAdvisedRequestHandler, getBeanClassLoader, getIntegrationPatternType, getRequiresReply, handleMessageInternal, hasAdviceChain, onInit, setAdviceChain, setBeanClassLoader, setRequiresReply
addNotPropagatedHeaders, createOutputMessage, getNotPropagatedHeaders, getOutputChannel, isAsync, messageBuilderForReply, produceOutput, resolveErrorChannel, sendErrorMessage, sendOutput, sendOutputs, setAsync, setNotPropagatedHeaders, setOutputChannel, setOutputChannelName, setSendTimeout, shouldCopyRequestHeaders, shouldSplitOutput, updateNotPropagatedHeaders
handleMessage, onComplete, onError, onNext, onSubscribe
buildSendTimer, destroy, getComponentType, getManagedName, getManagedType, getMetricsCaptor, getOrder, getOverrides, isLoggingEnabled, registerMetricsCaptor, sendTimer, setLoggingEnabled, setManagedName, setManagedType, setOrder, setShouldTrack, shouldTrack
afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toString
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, waitSE, waitSE, waitSE
getThisAs
getBeanName, getComponentName
public AbstractRemoteFileOutboundGateway(SessionFactory<F> sessionFactory, MessageSessionCallback<F,?> messageSessionCallback)
sessionFactory
- セッションファクトリ。messageSessionCallback
- コールバック。public AbstractRemoteFileOutboundGateway(RemoteFileTemplate<F> remoteFileTemplate, MessageSessionCallback<F,?> messageSessionCallback)
remoteFileTemplate
- リモートファイルテンプレート。messageSessionCallback
- コールバック。public AbstractRemoteFileOutboundGateway(SessionFactory<F> sessionFactory, StringSE command, @Nullable StringSE expression)
sessionFactory
- セッションファクトリ。command
- コマンド。expression
- ファイル名式。public AbstractRemoteFileOutboundGateway(SessionFactory<F> sessionFactory, AbstractRemoteFileOutboundGateway.Command command, @Nullable StringSE expression)
sessionFactory
- セッションファクトリ。command
- コマンド。expression
- ファイル名式。public AbstractRemoteFileOutboundGateway(RemoteFileTemplate<F> remoteFileTemplate, StringSE command, @Nullable StringSE expression)
remoteFileTemplate
- リモートファイルテンプレート。command
- コマンド。expression
- ファイル名式。public AbstractRemoteFileOutboundGateway(RemoteFileTemplate<F> remoteFileTemplate, AbstractRemoteFileOutboundGateway.Command command, @Nullable StringSE expressionArg)
remoteFileTemplate
- リモートファイルテンプレート。command
- コマンド。expressionArg
- ファイル名式。protected final void remoteFileTemplateExplicitlySet(boolean remoteFileTemplateExplicitlySet)
protected void assertRemoteFileTemplateMutability(StringSE propertyName)
public void setOptions(StringSE options)
options
- 設定するオプション AbstractRemoteFileOutboundGateway.Option
public void setOption(AbstractRemoteFileOutboundGateway.Option... options)
options
- 使用する AbstractRemoteFileOutboundGateway.Option
配列。AbstractRemoteFileOutboundGateway.Option
public void setRemoteFileSeparator(StringSE remoteFileSeparator)
remoteFileSeparator
- セパレータ。RemoteFileTemplate.setRemoteFileSeparator(String)
public void setLocalDirectory(FileSE localDirectory)
localDirectory
- 設定する localDirectorypublic void setLocalDirectoryExpression(Expression localDirectoryExpression)
localDirectoryExpression
- ローカルディレクトリを決定する SpEL。public void setLocalDirectoryExpressionString(StringSE localDirectoryExpression)
localDirectoryExpression
- ローカルディレクトリを決定する SpEL。public void setAutoCreateLocalDirectory(boolean autoCreateLocalDirectory)
boolean
フラグ。デフォルトは true
です。autoCreateLocalDirectory
- 設定する autoCreateLocalDirectorypublic void setTemporaryFileSuffix(StringSE temporaryFileSuffix)
.writing
。temporaryFileSuffix
- 設定する temporaryFileSuffixRemoteFileTemplate.setTemporaryFileSuffix(String)
public void setAutoCreateDirectory(boolean autoCreateDirectory)
autoCreateDirectory
- ディレクトリを作成する場合は true。RemoteFileTemplate.setAutoCreateDirectory(boolean)
public void setRemoteDirectoryExpression(Expression remoteDirectoryExpression)
remoteDirectoryExpression
- リモートディレクトリ式。RemoteFileTemplate.setRemoteDirectoryExpression(org.springframework.expression.Expression)
public void setTemporaryRemoteDirectoryExpression(Expression temporaryRemoteDirectoryExpression)
remoteDirectoryExpression
を使用してファイルの名前が変更されます。temporaryRemoteDirectoryExpression
- 一時的なリモートディレクトリ式。RemoteFileTemplate.setTemporaryRemoteDirectoryExpression(org.springframework.expression.Expression)
public void setFileNameExpression(Expression fileNameExpression)
fileNameExpression
- ファイル名式。RemoteFileTemplate.setFileNameExpression(org.springframework.expression.Expression)
public void setUseTemporaryFileName(boolean useTemporaryFileName)
useTemporaryFileName
- 一時ファイル名を使用する場合は true。RemoteFileTemplate.setUseTemporaryFileName(boolean)
public void setFileNameGenerator(FileNameGenerator fileNameGenerator)
fileNameGenerator
- ファイル名ジェネレーター。RemoteFileTemplate.setFileNameGenerator(org.springframework.integration.file.FileNameGenerator)
public void setCharset(StringSE charset)
UTF-8
charset
- 文字セット。RemoteFileTemplate.setCharset(java.lang.String)
public void setFilter(FileListFilter<F> filter)
FileListFilter
を設定します。filter
- 設定するフィルター public void setMputFilter(FileListFilter<FileSE> filter)
MPUT
コマンドの使用時にローカルファイルシステムビューに対して実行される FileListFilter
。filter
- 設定するフィルター public void setRenameExpression(Expression renameExpression)
renameExpression
- 使用する式。public void setRenameExpressionString(StringSE renameExpression)
renameExpression
- SpEL 構文の文字列。public void setLocalFilenameGeneratorExpression(Expression localFilenameGeneratorExpression)
localFilenameGeneratorExpression
- 使用する式。public void setLocalFilenameGeneratorExpressionString(StringSE localFilenameGeneratorExpression)
localFilenameGeneratorExpression
- SpEL 構文の文字列。public void setFileExistsMode(FileExistsMode fileExistsMode)
fileExistsMode
- fileExistsMode を設定します。public void setChmodOctal(StringSE chmod)
chmod
- 8 進数の文字列としてのアクセス許可(例: "600")。setChmod(int)
public void setChmod(int chmod)
chmod
- 許可。public boolean isChmodCapable()
protected final RemoteFileTemplate<F> getRemoteFileTemplate()
protected void doInit()
AbstractReplyProducingMessageHandler
の doInit
protected ObjectSE handleRequestMessage(Message<?> requestMessage)
AbstractReplyProducingMessageHandler
AbstractReplyProducingMessageHandler
の handleRequestMessage
requestMessage
- リクエストメッセージ。null
protected ListSE<StringSE> nlst(Message<?> message, Session<F> session, StringSE dir) throws IOExceptionSE
message
- 現在のリクエストに関連するメッセージ session
- list file names コマンドを実行するセッション dir
- ファイル名をリストするリモートディレクトリ IOExceptionSE
- リモートコマンドの実行中の IO 例外 protected boolean rm(Message<?> message, Session<F> session, StringSE remoteFilePath) throws IOExceptionSE
message
- 削除するパスに関連するリクエストメッセージ session
- 削除コマンドを実行するためのリモートプロトコルセッション remoteFilePath
- 削除するリモートパス IOExceptionSE
- リモートコマンドの実行中の IO 例外 protected boolean mv(Message<?> message, Session<F> session, StringSE remoteFilePath, StringSE remoteFileNewPath) throws IOExceptionSE
message
- この移動コマンドに関連するリクエストメッセージ session
- 移動コマンドを実行するためのリモートプロトコルセッション remoteFilePath
- ソースリモートパス remoteFileNewPath
- ターゲットリモートパス IOExceptionSE
- リモートコマンドの実行中の IO 例外 protected StringSE put(Message<?> message, Session<F> session, StringSE subDirectory)
message
- この put コマンドに関連するリクエストメッセージ session
- この呼び出しコンテキストに関連するリモートプロトコルセッション subDirectory
- 配置するターゲットサブディレクトリ protected void doChmod(RemoteFileOperations<F> remoteFileOperations, StringSE path, int chmodToSet)
remoteFileOperations
- リモートファイルテンプレート。path
- パス。chmodToSet
- 設定する chmod。protected ListSE<StringSE> mPut(Message<?> message, Session<F> session, FileSE localDir)
message
- この mPut コマンドに関連するリクエストメッセージ session
- この呼び出しコンテキストのリモートプロトコルセッション localDir
- サーバーに出力するローカルディレクトリ protected ListSE<?> ls(Message<?> message, Session<F> session, StringSE dir) throws IOExceptionSE
message
- リストリクエストに関連するメッセージ session
- list コマンドを実行するセッション dir
- コンテンツをリストするリモートディレクトリ IOExceptionSE
- リモートコマンドの実行中の IO 例外 protected FileSE get(Message<?> message, Session<F> session, StringSE remoteDir, StringSE remoteFilePath, StringSE remoteFilename, F fileInfoParam) throws IOExceptionSE
message
- メッセージ。session
- セッション。remoteDir
- リモートディレクトリ。remoteFilePath
- リモートファイルのパス。remoteFilename
- リモートファイル名。fileInfoParam
- リモートファイル情報。null の場合、最初に "ls" コマンドを実行します。IOExceptionSE
- IOException。protected ListSE<FileSE> mGet(Message<?> message, Session<F> session, StringSE remoteDirectory, StringSE remoteFilename) throws IOExceptionSE
protected StringSE getRemoteFilename(StringSE remoteFilePath)
remoteFilePath
- リモートファイルのパス。protected abstract boolean isDirectory(F file)
protected abstract boolean isLink(F file)
protected abstract StringSE getFilename(AbstractFileInfo<F> file)
protected abstract long getModified(F file)
protected abstract ListSE<AbstractFileInfo<F>> asFileInfoList(CollectionSE<F> files)