クラス 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.RecoveryCallback, RabbitTemplate.ReturnsCallback, RabbitTemplate.TemplateConsumerインターフェース org.springframework.amqp.rabbit.core.RabbitOperations から継承されたネストクラス / インターフェース
RabbitOperations.OperationsCallback<T extends @Nullable ObjectSE>フィールドのサマリー
クラス org.springframework.amqp.rabbit.connection.RabbitAccessor から継承されたフィールド
loggerコンストラクターの概要
コンストラクターメソッドのサマリー
修飾子と型メソッド説明protected @Nullable MessagedoSendAndReceiveWithFixed(@Nullable StringSE exchange, @Nullable StringSE routingKey, Message message, @Nullable CorrelationData correlationData) voidprotected voidsendToRabbit(com.rabbitmq.client.Channel channel, StringSE exchange, StringSE routingKey, boolean mandatory, Message message) voidsetApplicationContext(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, getPendingReplyCounter, 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 @Nullable Message doSendAndReceiveWithFixed(@Nullable StringSE exchange, @Nullable StringSE routingKey, Message message, @Nullable CorrelationData correlationData) - オーバーライド:
- クラス
RabbitTemplateのdoSendAndReceiveWithFixed