クラス TestRabbitTemplate
- java.lang.ObjectSE
-
- org.springframework.amqp.rabbit.connection.RabbitAccessor
-
- org.springframework.amqp.rabbit.core.RabbitTemplate
-
- org.springframework.amqp.rabbit.test.TestRabbitTemplate
- 実装済みのインターフェース一覧:
EventListenerSE、AmqpTemplate、MessageListener、PublisherCallbackChannel.Listener、RabbitOperations、ChannelAwareMessageListener、ListenerContainerAware、Aware、BeanFactoryAware、BeanNameAware、DisposableBean、InitializingBean、ApplicationContextAware、ApplicationListener<ContextRefreshedEvent>、Lifecycle
public class TestRabbitTemplate extends RabbitTemplate implements ApplicationContextAware, ApplicationListener<ContextRefreshedEvent>
@RabbitListenerを直接呼び出すRabbitTemplate。現在、ルーティングキーのキュー名のみがサポートされています。現在、発行元の確認 /return はサポートされていません。- 導入:
- 2.0
- 作成者:
- Gary Russell, Artem Bilan
ネストされたクラスの概要
クラス org.springframework.amqp.rabbit.core.RabbitTemplate から継承されたネストクラス / インターフェース
RabbitTemplate.ConfirmCallback, RabbitTemplate.ReturnCallback, RabbitTemplate.ReturnsCallback, RabbitTemplate.TemplateConsumer
インターフェース org.springframework.amqp.rabbit.core.RabbitOperations から継承されたネストクラス / インターフェース
RabbitOperations.OperationsCallback<T>
フィールド概要
クラス org.springframework.amqp.rabbit.connection.RabbitAccessor から継承されたフィールド
logger
コンストラクター概要
コンストラクター コンストラクター 説明 TestRabbitTemplate(ConnectionFactory connectionFactory)
方法の概要
すべてのメソッド インスタンスメソッド 具象メソッド 修飾子と型 メソッド 説明 protected MessagedoSendAndReceiveWithFixed(StringSE exchange, StringSE routingKey, Message message, CorrelationData correlationData)voidonApplicationEvent(ContextRefreshedEvent event)protected voidsendToRabbit(com.rabbitmq.client.Channel channel, StringSE exchange, StringSE routingKey, boolean mandatory, Message message)voidsetApplicationContext(ApplicationContext applicationContext)protected booleanuseDirectReplyTo()このメソッドをオーバーライドして、他の条件を使用して、直接返信先 (https://www.rabbitmq.com/direct-reply-to.html).クラス org.springframework.amqp.rabbit.core.RabbitTemplate から継承されたメソッド
addAfterReceivePostProcessors, addBeforePublishPostProcessors, addListener, convertAndSend, convertAndSend, convertAndSend, convertAndSend, convertAndSend, convertAndSend, convertAndSend, convertAndSend, convertAndSend, convertAndSend, convertAndSend, convertMessageIfNecessary, convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, convertSendAndReceiveAsType, convertSendAndReceiveAsType, convertSendAndReceiveAsType, convertSendAndReceiveAsType, convertSendAndReceiveAsType, convertSendAndReceiveAsType, convertSendAndReceiveAsType, convertSendAndReceiveAsType, convertSendAndReceiveAsType, convertSendAndReceiveAsType, convertSendAndReceiveAsType, convertSendAndReceiveRaw, correlationConvertAndSend, destroy, determineConfirmsReturnsCapability, doReceiveNoWait, doSend, doSendAndReceive, doSendAndReceiveWithTemporary, doStart, doStop, execute, expectedQueueNames, getAfterReceivePostProcessors, getDefaultReceiveQueue, getEncoding, getExchange, getMessageConverter, getMessagePropertiesConverter, getRoutingKey, getUnconfirmed, getUnconfirmedCount, getUUID, handleConfirm, handleReturn, handleReturn, initDefaultStrategies, invoke, isChannelLocallyTransacted, isConfirmListener, isMandatoryFor, isReturnListener, isRunning, isUsePublisherConnection, nullSafeExchange, nullSafeRoutingKey, onMessage, onMessage, receive, receive, receive, receive, receiveAndConvert, receiveAndConvert, receiveAndConvert, receiveAndConvert, receiveAndConvert, receiveAndConvert, receiveAndConvert, receiveAndConvert, receiveAndReply, receiveAndReply, receiveAndReply, receiveAndReply, receiveAndReply, receiveAndReply, removeAfterReceivePostProcessor, removeBeforePublishPostProcessor, replyTimedOut, revoke, send, send, send, send, send, sendAndReceive, sendAndReceive, sendAndReceive, sendAndReceive, sendAndReceive, sendAndReceive, setAfterReceivePostProcessors, setBeanFactory, setBeanName, setBeforePublishPostProcessors, setConfirmCallback, setConnectionFactory, setCorrelationDataPostProcessor, setCorrelationKey, setDefaultReceiveQueue, setEncoding, setExchange, setMandatory, setMandatoryExpression, setMandatoryExpressionString, setMessageConverter, setMessagePropertiesConverter, setNoLocalReplyConsumer, setReceiveConnectionFactorySelectorExpression, setReceiveTimeout, setRecoveryCallback, setReplyAddress, setReplyErrorHandler, setReplyTimeout, setRetryTemplate, setReturnCallback, setReturnsCallback, setRoutingKey, setSendConnectionFactorySelectorExpression, setTaskExecutor, setUseChannelForCorrelation, setUseDirectReplyToContainer, setUsePublisherConnection, setUserCorrelationId, setUserIdExpression, setUserIdExpressionString, setUseTemporaryReplyQueues, start, stop, waitForConfirms, waitForConfirmsOrDie
クラス org.springframework.amqp.rabbit.connection.RabbitAccessor から継承されたメソッド
afterPropertiesSet, convertRabbitAccessException, createConnection, getChannel, getConnection, getConnectionFactory, getTransactionalResourceHolder, isChannelTransacted, setChannelTransacted
クラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, toString, wait, waitSE, waitSE
インターフェース org.springframework.amqp.rabbit.listener.api.ChannelAwareMessageListener から継承されたメソッド
onMessageBatch
インターフェース org.springframework.amqp.core.MessageListener から継承されたメソッド
containerAckMode, isAsyncReplies, onMessageBatch
インターフェース org.springframework.amqp.rabbit.core.RabbitOperations から継承されたメソッド
convertSendAndReceiveAsType, getConnectionFactory, invoke
コンストラクターの詳細
TestRabbitTemplate
public TestRabbitTemplate(ConnectionFactory connectionFactory)
メソッドの詳細
setApplicationContext
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
- 次で指定:
- インターフェース
ApplicationContextAware内のsetApplicationContext - 例外:
BeansException
onApplicationEvent
public void onApplicationEvent(ContextRefreshedEvent event)
- 次で指定:
- インターフェース
ApplicationListener<ContextRefreshedEvent>内のonApplicationEvent
useDirectReplyTo
protected boolean useDirectReplyTo()
クラスからコピーされた説明:RabbitTemplateこのメソッドをオーバーライドして、他の条件を使用して、直接返信先 (https://www.rabbitmq.com/direct-reply-to.html)) を使用するかどうかを決定します。デフォルトの実装では、ブローカーがサポートしており、replyAddressが設定されておらず、useTemporaryReplyQueuesが false である場合に true を返します。直接返信先が使用されていない場合、テンプレートは、返信用の一時的な排他的な自動削除キューを作成します。このメソッドは、最初のメッセージが同期ブロックから送信されたときに 1 回だけ呼び出されます。
- オーバーライド:
- クラス
RabbitTemplateのuseDirectReplyTo - 戻り値:
- 直接返信を使用する場合は true。
sendToRabbit
protected void sendToRabbit(com.rabbitmq.client.Channel channel, StringSE exchange, StringSE routingKey, boolean mandatory, Message message)- オーバーライド:
- クラス
RabbitTemplateのsendToRabbit
doSendAndReceiveWithFixed
protected Message doSendAndReceiveWithFixed(StringSE exchange, StringSE routingKey, Message message, CorrelationData correlationData)
- オーバーライド:
- クラス
RabbitTemplateのdoSendAndReceiveWithFixed