クラス 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, Christian Tzolov
ネストされたクラスのサマリー
クラス org.springframework.amqp.rabbit.core.RabbitTemplate から継承されたネストクラス / インターフェース
RabbitTemplate.ConfirmCallback, RabbitTemplate.ReturnsCallback, RabbitTemplate.TemplateConsumer
インターフェース org.springframework.amqp.rabbit.core.RabbitOperations から継承されたネストクラス / インターフェース
RabbitOperations.OperationsCallback<T>
フィールドのサマリー
クラス org.springframework.amqp.rabbit.connection.RabbitAccessor から継承されたフィールド
logger
コンストラクターの概要
コンストラクターメソッドのサマリー
修飾子と型メソッド説明protected Message
doSendAndReceiveWithFixed
(StringSE exchange, StringSE routingKey, Message message, CorrelationData correlationData) void
protected void
sendToRabbit
(com.rabbitmq.client.Channel channel, StringSE exchange, StringSE routingKey, boolean mandatory, Message message) void
setApplicationContext
(ApplicationContext applicationContext) protected boolean
( direct Reply-to ) を使用するかどうかを決定するために他の条件を使用して、このメソッドをオーバーライドします。クラス org.springframework.amqp.rabbit.core.RabbitTemplate から継承されたメソッド
addAfterReceivePostProcessors, addBeforePublishPostProcessors, addConsumerArg, 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, doReceiveNoWait, doSend, doSendAndReceive, doSendAndReceiveWithTemporary, doStart, doStop, execute, expectedQueueNames, getAfterReceivePostProcessors, getBeforePublishPostProcessors, getDefaultReceiveQueue, getEncoding, getExchange, getMessageConverter, getMessagePropertiesConverter, getRoutingKey, getUnconfirmed, getUnconfirmedCount, getUUID, handleConfirm, handleReturn, initDefaultStrategies, invoke, isChannelLocallyTransacted, isConfirmListener, isMandatoryFor, isReturnListener, isRunning, isUsePublisherConnection, logReceived, nullSafeExchange, nullSafeRoutingKey, observeTheSend, onMessage, receive, receive, receive, receive, receiveAndConvert, receiveAndConvert, receiveAndConvert, receiveAndConvert, receiveAndConvert, receiveAndConvert, receiveAndConvert, receiveAndConvert, receiveAndReply, receiveAndReply, receiveAndReply, receiveAndReply, receiveAndReply, receiveAndReply, removeAfterReceivePostProcessor, removeBeforePublishPostProcessor, removeConsumerArg, 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, setObservationConvention, setObservationEnabled, setReceiveConnectionFactorySelectorExpression, setReceiveTimeout, setRecoveryCallback, setReplyAddress, setReplyErrorHandler, setReplyTimeout, setRetryTemplate, 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, getObservationRegistry, getTransactionalResourceHolder, isChannelTransacted, obtainObservationRegistry, setChannelTransacted
クラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, toString, wait, waitSE, waitSE
インターフェース org.springframework.context.ApplicationListener から継承されたメソッド
supportsAsyncExecution
インターフェース org.springframework.amqp.rabbit.listener.api.ChannelAwareMessageListener から継承されたメソッド
onMessage, onMessageBatch
インターフェース org.springframework.amqp.core.MessageListener から継承されたメソッド
containerAckMode, isAsyncReplies, onMessageBatch
インターフェース org.springframework.amqp.rabbit.core.RabbitOperations から継承されたメソッド
convertSendAndReceiveAsType, getConnectionFactory, invoke
コンストラクターの詳細
TestRabbitTemplate
メソッドの詳細
setApplicationContext
- 次で指定:
- インターフェース
ApplicationContextAware
のsetApplicationContext
- オーバーライド:
- クラス
RabbitTemplate
のsetApplicationContext
- 例外:
BeansException
onApplicationEvent
- 次で指定:
- インターフェース
ApplicationListener<ContextRefreshedEvent>
のonApplicationEvent
useDirectReplyTo
protected boolean useDirectReplyTo()クラスからコピーされた説明:RabbitTemplate
( direct Reply-to ) を使用するかどうかを決定するために他の条件を使用して、このメソッドをオーバーライドします。デフォルトの実装は、ブローカーがサポートしており、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