クラス RabbitAccessor
- java.lang.ObjectSE
-
- org.springframework.amqp.rabbit.connection.RabbitAccessor
- 実装済みのインターフェース一覧:
InitializingBean
- 既知の直属サブクラス
AbstractMessageListenerContainer,RabbitTemplate
public abstract class RabbitAccessor extends ObjectSE implements InitializingBean
- 作成者:
- Mark Fisher, Dave Syer, Gary Russell
コンストラクター概要
コンストラクター コンストラクター 説明 RabbitAccessor()
方法の概要
すべてのメソッド インスタンスメソッド 具象メソッド 修飾子と型 メソッド 説明 voidafterPropertiesSet()protected RuntimeExceptionSEconvertRabbitAccessException(ExceptionSE ex)protected ConnectioncreateConnection()このテンプレートの ConnectionFactory とそのホストとポートの値を使用して、RabbitMQ 接続を作成します。protected com.rabbitmq.client.ChannelgetChannel(RabbitResourceHolder holder)指定された RabbitResourceHolder から適切なチャネルを取得します。protected ConnectiongetConnection(RabbitResourceHolder holder)指定された RabbitResourceHolder から適切な接続をフェッチします。ConnectionFactorygetConnectionFactory()protected RabbitResourceHoldergetTransactionalResourceHolder()booleanisChannelTransacted()voidsetChannelTransacted(boolean transactional)このコンポーネントによって作成されたチャネルがトランザクションになることを示すフラグ。voidsetConnectionFactory(ConnectionFactory connectionFactory)RabbitMQConnectionsの取得に使用する ConnectionFactory を設定します。
フィールドの詳細
logger
protected final Log logger
サブクラスで利用可能なロガー。
メソッドの詳細
isChannelTransacted
public boolean isChannelTransacted()
setChannelTransacted
public void setChannelTransacted(boolean transactional)
このコンポーネントによって作成されたチャネルがトランザクションになることを示すフラグ。- パラメーター:
transactional- 設定するフラグ値
setConnectionFactory
public void setConnectionFactory(ConnectionFactory connectionFactory)
RabbitMQConnectionsの取得に使用する ConnectionFactory を設定します。- パラメーター:
connectionFactory- 接続ファクトリ。
getConnectionFactory
public ConnectionFactory getConnectionFactory()
- 戻り値:
- このアクセサーが RabbitMQ
Connectionsを取得するために使用する ConnectionFactory。
afterPropertiesSet
public void afterPropertiesSet()
- 次で指定:
- インターフェース
InitializingBean内のafterPropertiesSet
createConnection
protected Connection createConnection()
このテンプレートの ConnectionFactory とそのホストとポートの値を使用して、RabbitMQ 接続を作成します。- 戻り値:
- 新しい RabbitMQ 接続
- 関連事項:
ConnectionFactory.createConnection()
getConnection
@Nullable protected Connection getConnection(RabbitResourceHolder holder)
指定された RabbitResourceHolder から適切な接続をフェッチします。- パラメーター:
holder- RabbitResourceHolder- 戻り値:
- ホルダーからフェッチされた適切な接続、または見つからない場合は
null
getChannel
@Nullable protected com.rabbitmq.client.Channel getChannel(RabbitResourceHolder holder)
指定された RabbitResourceHolder から適切なチャネルを取得します。- パラメーター:
holder- RabbitResourceHolder- 戻り値:
- 所有者から取得した適切なチャネル、または見つからない場合は
null
getTransactionalResourceHolder
protected RabbitResourceHolder getTransactionalResourceHolder()
convertRabbitAccessException
protected RuntimeExceptionSE convertRabbitAccessException(ExceptionSE ex)