クラス ControlBusCommandRegistry
java.lang.ObjectSE
org.springframework.integration.support.management.ControlBusCommandRegistry
- 実装されているすべてのインターフェース:
Aware
、BeanPostProcessor
、DestructionAwareBeanPostProcessor
、SmartInitializingSingleton
、ApplicationContextAware
public class ControlBusCommandRegistry
extends ObjectSE
implements ApplicationContextAware, SmartInitializingSingleton, DestructionAwareBeanPostProcessor
コントロールバスコマンドとそれぞれの SpEL 式の関連を提供するグローバルコンポーネント。
- 導入:
- 6.4
- 作成者:
- Artem Bilan
- 関連事項:
ネストされたクラスの要約
ネストされたクラス修飾子と型クラス説明static final class
制御バスコマンドをパラメーター型を持つ Bean メソッドとして表す Java Bean。コンストラクターの概要
コンストラクターメソッドのサマリー
修飾子と型メソッド説明void
登録されたコントロールバスコマンドを返します。getExpressionForCommand
(StringSE command, ClassSE<?>... parameterTypes) パラメーター型を使用して呼び出すコマンドの SpEL 式を取得します。postProcessAfterInitialization
(ObjectSE bean, StringSE beanName) void
postProcessBeforeDestruction
(ObjectSE bean, StringSE beanName) void
registerControlBusCommands
(StringSE beanName, ObjectSE bean) 特定の Bean のコントロールバスコマンド (存在する場合) を手動で登録します。boolean
requiresDestruction
(ObjectSE bean) void
setApplicationContext
(ApplicationContext applicationContext) void
setEagerInitialization
(boolean eagerInitialization) アプリケーションコンテキストの初期化後に制御バスコマンドの読み込みをオンにするには、true
に設定します。クラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, toString, wait, waitSE, waitSE
インターフェース org.springframework.beans.factory.config.BeanPostProcessor から継承されたメソッド
postProcessBeforeInitialization
コンストラクターの詳細
ControlBusCommandRegistry
public ControlBusCommandRegistry()
メソッドの詳細
setEagerInitialization
public void setEagerInitialization(boolean eagerInitialization) アプリケーションコンテキストの初期化後に制御バスコマンドの読み込みをオンにするには、true
に設定します。- パラメーター:
eagerInitialization
- このレジストリを積極的に初期化する場合は true です。
setApplicationContext
- 次で指定:
- インターフェース
ApplicationContextAware
のsetApplicationContext
- 例外:
BeansException
afterSingletonsInstantiated
public void afterSingletonsInstantiated()- 次で指定:
- インターフェース
SmartInitializingSingleton
のafterSingletonsInstantiated
postProcessAfterInitialization
public ObjectSE postProcessAfterInitialization(ObjectSE bean, StringSE beanName) throws BeansException - 次で指定:
- インターフェース
BeanPostProcessor
のpostProcessAfterInitialization
- 例外:
BeansException
registerControlBusCommands
特定の Bean のコントロールバスコマンド (存在する場合) を手動で登録します。Bean は、Lifecycle
またはCustomizableThreadCreator
のインスタンス内にあるか、ManagedResource
またはIntegrationManagedResource
アノテーションでマークされている必要があります。- パラメーター:
beanName
- 登録名 Beanbean
- 登録用 Bean
requiresDestruction
- 次で指定:
- インターフェース
DestructionAwareBeanPostProcessor
のrequiresDestruction
postProcessBeforeDestruction
- 次で指定:
- インターフェース
DestructionAwareBeanPostProcessor
のpostProcessBeforeDestruction
- 例外:
BeansException
getCommands
登録されたコントロールバスコマンドを返します。- 戻り値:
- 登録されたコマンド。
getExpressionForCommand
パラメーター型を使用して呼び出すコマンドの SpEL 式を取得します。コマンドはbeanName.methodName
形式である必要があります。(または、単純な式との下位互換性のために@beanName.methodName()
)。beanName
が複雑なリテラルである場合は、一重引用符で囲む必要があります (例:'some.complex.bean-name'
)。呼び出すターゲットメソッドは、ControlBusMethodFilter
要件に適合し、指定されたパラメーター型と一致する必要があります。- パラメーター:
command
- 呼び出すコマンド。parameterTypes
- 呼び出す対象メソッドのパラメーター型。- 戻り値:
- 提供されたコマンドの SpEL 式。
- 例外:
IllegalArgumentExceptionSE
- 提供されたコマンドがコントロールバスの要件またはターゲットメソッドの契約と一致しない場合。