クラス RabbitGatewaySupport
java.lang.ObjectSE
org.springframework.amqp.rabbit.core.RabbitGatewaySupport
- 実装済みのインターフェース一覧:
InitializingBean
RabbitMQ アクセスが必要なアプリケーションクラスの便利なスーパークラス。
ConnectionFactory または RabbitTemplate インスタンスを設定する必要があります。ConnectionFactory が渡されると、独自の RabbitTemplate が作成されます。createRabbitTemplate(org.springframework.amqp.rabbit.connection.ConnectionFactory) メソッドをオーバーライドすることにより、特定の ConnectionFactory のカスタム RabbitTemplate インスタンスを作成できます。
フィールド概要
フィールドコンストラクター概要
コンストラクター方法の概要
修飾子と型メソッド説明final voidprotected RabbitTemplatecreateRabbitTemplate(ConnectionFactory connectionFactory) 指定された ConnectionFactory の RabbitTemplate を作成します。final @Nullable ConnectionFactoryfinal @Nullable RabbitOperationsprotected voidサブクラスは、カスタム初期化動作のためにこれをオーバーライドできます。final voidsetConnectionFactory(ConnectionFactory connectionFactory) ゲートウェイが使用する Rabbit 接続ファクトリを設定します。final voidsetRabbitOperations(RabbitOperations rabbitOperations) ゲートウェイのRabbitOperationsを設定します。
フィールドの詳細
logger
protected final org.apache.commons.logging.Log loggerサブクラスで利用可能なロガー。
コンストラクターの詳細
RabbitGatewaySupport
public RabbitGatewaySupport()
メソッドの詳細
setConnectionFactory
ゲートウェイが使用する Rabbit 接続ファクトリを設定します。指定された ConnectionFactory の RabbitTemplate を自動的に作成します。- パラメーター:
connectionFactory- 接続ファクトリ。- 関連事項:
createRabbitTemplate
指定された ConnectionFactory の RabbitTemplate を作成します。ゲートウェイに ConnectionFactory 参照を設定する場合にのみ呼び出されます。- パラメーター:
connectionFactory- RabbitTemplate を作成する Rabbit ConnectionFactory- 戻り値:
- 新しい RabbitTemplate インスタンス
- 関連事項:
getConnectionFactory
- 戻り値:
- ゲートウェイで使用される Rabbit ConnectionFactory。
setRabbitOperations
ゲートウェイのRabbitOperationsを設定します。- パラメーター:
rabbitOperations- Rabbit 操作。- 関連事項:
getRabbitOperations
- 戻り値:
- ゲートウェイの
RabbitOperations。
afterPropertiesSet
public final void afterPropertiesSet() throws IllegalArgumentExceptionSE, BeanInitializationException- 次で指定:
- インターフェース
InitializingBeanのafterPropertiesSet - 例外:
IllegalArgumentExceptionSEBeanInitializationException
initGateway
protected void initGateway()サブクラスは、カスタム初期化動作のためにこれをオーバーライドできます。このインスタンスの Bean プロパティの入力後に呼び出されます。