public class AmqpOutboundEndpoint extends AbstractReplyProducingMessageHandler implements RabbitTemplate.ConfirmCallback, RabbitTemplate.ReturnCallback, ApplicationListener<ContextRefreshedEvent>, Lifecycle
AbstractReplyProducingMessageHandler.RequestHandlermessagingTemplateloggerHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| Constructor and Description |
|---|
AmqpOutboundEndpoint(AmqpTemplate amqpTemplate) |
| Modifier and Type | Method and Description |
|---|---|
void |
confirm(CorrelationData correlationData,
boolean ack,
String cause) |
protected void |
doInit() |
String |
getComponentType()
Subclasses may implement this method to provide component type information.
|
protected Object |
handleRequestMessage(Message<?> requestMessage)
Subclasses must implement this method to handle the request Message.
|
boolean |
isRunning() |
void |
onApplicationEvent(ContextRefreshedEvent event) |
void |
returnedMessage(Message message,
int replyCode,
String replyText,
String exchange,
String routingKey) |
void |
setConfirmAckChannel(MessageChannel ackChannel) |
void |
setConfirmCorrelationExpression(String confirmCorrelationExpression)
Deprecated.
in favor of
setExpressionConfirmCorrelation(org.springframework.expression.Expression). Will be changed in a future release
to use Expression parameter. |
void |
setConfirmNackChannel(MessageChannel nackChannel) |
void |
setDefaultDeliveryMode(MessageDeliveryMode defaultDeliveryMode) |
void |
setExchangeName(String exchangeName) |
void |
setExchangeNameExpression(String exchangeNameExpression)
Deprecated.
in favor of
setExpressionExchangeName(org.springframework.expression.Expression). Will be changed in a future release
to use an Expression parameter. |
void |
setExpectReply(boolean expectReply) |
void |
setExpressionConfirmCorrelation(Expression confirmCorrelationExpression)
Temporary, will be changed to
setConfirmCorrelationExpression in a future release. |
void |
setExpressionExchangeName(Expression exchangeNameExpression)
Temporary, will be changed to
setExchangeNameExpression(java.lang.String) in a future release. |
void |
setExpressionRoutingKey(Expression routingKeyExpression)
Temporary, will be changed to
setRoutingKeyExpression in a future release. |
void |
setHeaderMapper(AmqpHeaderMapper headerMapper) |
void |
setLazyConnect(boolean lazyConnect)
Set to
false to attempt to connect during endpoint start;
default true, meaning the connection will be attempted
to be established on the arrival of the first message. |
void |
setReturnChannel(MessageChannel returnChannel) |
void |
setRoutingKey(String routingKey) |
void |
setRoutingKeyExpression(String routingKeyExpression)
Deprecated.
in favor of
setExpressionRoutingKey(org.springframework.expression.Expression). Will be changed in a future release
to use an Expression parameter. |
void |
start() |
void |
stop() |
doInvokeAdvisedRequestHandler, handleMessageInternal, hasAdviceChain, onInit, setAdviceChain, setBeanClassLoader, setRequiresReplygetOutputChannel, produceOutput, sendOutputs, setOutputChannel, setOutputChannelName, setSendTimeout, shouldCopyRequestHeaders, shouldSplitOutputconfigureMetrics, enableCounts, enableStats, getActiveCount, getActiveCountLong, getDuration, getErrorCount, getErrorCountLong, getHandleCount, getHandleCountLong, getManagedName, getManagedType, getMaxDuration, getMeanDuration, getMinDuration, getOrder, getStandardDeviationDuration, handleMessage, isCountsEnabled, isLoggingEnabled, isStatsEnabled, reset, setLoggingEnabled, setManagedName, setManagedType, setOrder, setShouldTrackafterPropertiesSet, extractTypeIfPossible, getApplicationContext, getApplicationContextId, getBeanFactory, getChannelResolver, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setTaskScheduler, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetComponentNamepublic AmqpOutboundEndpoint(AmqpTemplate amqpTemplate)
public void setHeaderMapper(AmqpHeaderMapper headerMapper)
public void setExchangeName(String exchangeName)
@Deprecated public void setExchangeNameExpression(String exchangeNameExpression)
setExpressionExchangeName(org.springframework.expression.Expression). Will be changed in a future release
to use an Expression parameter.exchangeNameExpression - the expression to set.public void setExpressionExchangeName(Expression exchangeNameExpression)
setExchangeNameExpression(java.lang.String) in a future release.exchangeNameExpression - the expression to set.public void setRoutingKey(String routingKey)
@Deprecated public void setRoutingKeyExpression(String routingKeyExpression)
setExpressionRoutingKey(org.springframework.expression.Expression). Will be changed in a future release
to use an Expression parameter.routingKeyExpression - the expression to set.public void setExpressionRoutingKey(Expression routingKeyExpression)
setRoutingKeyExpression in a future release.routingKeyExpression - the expression to set.public void setExpectReply(boolean expectReply)
@Deprecated public void setConfirmCorrelationExpression(String confirmCorrelationExpression)
setExpressionConfirmCorrelation(org.springframework.expression.Expression). Will be changed in a future release
to use Expression parameter.confirmCorrelationExpression - the expression to set.public void setExpressionConfirmCorrelation(Expression confirmCorrelationExpression)
setConfirmCorrelationExpression in a future release.confirmCorrelationExpression - the expression to set.public void setConfirmAckChannel(MessageChannel ackChannel)
public void setConfirmNackChannel(MessageChannel nackChannel)
public void setReturnChannel(MessageChannel returnChannel)
public void setDefaultDeliveryMode(MessageDeliveryMode defaultDeliveryMode)
public void setLazyConnect(boolean lazyConnect)
false to attempt to connect during endpoint start;
default true, meaning the connection will be attempted
to be established on the arrival of the first message.lazyConnect - the lazyConnect to setpublic String getComponentType()
IntegrationObjectSupportgetComponentType in interface NamedComponentgetComponentType in class AbstractMessageHandlerprotected void doInit()
doInit in class AbstractReplyProducingMessageHandlerpublic void onApplicationEvent(ContextRefreshedEvent event)
onApplicationEvent in interface ApplicationListener<ContextRefreshedEvent>protected Object handleRequestMessage(Message<?> requestMessage)
AbstractReplyProducingMessageHandlerhandleRequestMessage in class AbstractReplyProducingMessageHandlerrequestMessage - The request message.null.public void confirm(CorrelationData correlationData, boolean ack, String cause)
confirm in interface RabbitTemplate.ConfirmCallbackpublic void returnedMessage(Message message, int replyCode, String replyText, String exchange, String routingKey)
returnedMessage in interface RabbitTemplate.ReturnCallback