public interface IntegrationFlowContextIntegrationFlow の動的(手動)登録用のパブリック API。このコンポーネントの Bean は、フレームワークを介して自動的に提供されます。Bean 名は、大文字と小文字を区別しないクラス名に基づいています。使用する前に、ターゲットサービスに注入する必要があります。
典型的なユースケース、アルゴリズムは次のとおりです。
IntegrationFlow インスタンスを作成しますid および autoStartup フラグを使用して、その IntegrationFlow をこの IntegrationFlowContext に登録します。IntegrationFlow の MessagingTemplate を取得し(MessageChannel から開始された場合)、メッセージを IntegrationFlow に送信(または送受信)します。IntegrationFlowContext から id によって IntegrationFlow を削除します 便宜上、関連する IntegrationFlowContext.IntegrationFlowRegistration は登録後に返されます。ターゲット IntegrationFlow へのアクセス、またはそのライフサイクルでの操作に使用できます。
IntegrationFlowContext.IntegrationFlowRegistration| 修飾子と型 | インターフェースと説明 |
|---|---|
static interface | IntegrationFlowContext.IntegrationFlowRegistration |
static interface | IntegrationFlowContext.IntegrationFlowRegistrationBuilder アプリケーションコンテキストで IntegrationFlow を登録するオプションの Builder パターン実装。 |
| 修飾子と型 | メソッドと説明 |
|---|---|
IntegrationFlowContext.IntegrationFlowRegistration | getRegistrationById(StringSE flowId) |
MapSE<StringSE, IntegrationFlowContext.IntegrationFlowRegistration> | getRegistry() 統合フロー名の IntegrationFlowContext.IntegrationFlowRegistration インスタンスへのマッピングの状態を提供します。 |
default boolean | isUseIdAsPrefix(StringSE flowId)true を返すと、フロー Bean 名の前にフロー ID とピリオドが付きます。 |
MessagingTemplate | messagingTemplateFor(StringSE flowId) |
IntegrationFlowContext.IntegrationFlowRegistrationBuilder | registration(IntegrationFlow integrationFlow) アソシエイトは、 IntegrationFlow に IntegrationFlowContext.IntegrationFlowRegistrationBuilder を提供して、アプリケーションコンテキストでの追加オプションとさらなる登録を実現しました。 |
void | remove(StringSE flowId) 提供された flowId の IntegrationFlow Bean(およびそれに依存するすべての Bean)を破棄し、そのすべてのローカルキャッシュをクリーンアップします。 |
IntegrationFlowContext.IntegrationFlowRegistrationBuilder registration(IntegrationFlow integrationFlow)
IntegrationFlow に IntegrationFlowContext.IntegrationFlowRegistrationBuilder を提供して、アプリケーションコンテキストでの追加オプションとさらなる登録を実現しました。integrationFlow - 登録する IntegrationFlowIntegrationFlow に関連付けられた IntegrationFlowRegistrationBuilderIntegrationFlowContext.IntegrationFlowRegistration getRegistrationById(StringSE flowId)
flowId - 取得する Bean 名 id または null の IntegrationFlowRegistration void remove(StringSE flowId)
flowId の IntegrationFlow Bean(およびそれに依存するすべての Bean)を破棄し、そのすべてのローカルキャッシュをクリーンアップします。flowId - 破棄する Bean 名 MessagingTemplate messagingTemplateFor(StringSE flowId)
flowId の IntegrationFlow の入力チャネルにデフォルトの宛先が設定された MessagingTemplate を取得します。 この方法では、任意の IntegrationFlow Bean(手動で登録しただけでなく)を使用できます。
IntegrationFlow が MessageChannel で始まらない場合、IllegalStateExceptionSE がスローされます。
flowId - 入力チャネルを取得するための Bean 名 MessagingTemplate インスタンス MapSE<StringSE,IntegrationFlowContext.IntegrationFlowRegistration> getRegistry()
IntegrationFlowContext.IntegrationFlowRegistration インスタンスへのマッピングの状態を提供します。default boolean isUseIdAsPrefix(StringSE flowId)
flowId - フロー ID。