public abstract class AbstractAmqpChannel extends AbstractMessageChannel implements DisposableBean, ConnectionListener
AbstractMessageChannel.ChannelInterceptorListIntegrationManagement.ManagementOverridesinterceptors, metersEXPRESSION_PARSER, loggerINDEFINITE_TIMEOUTMETER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
protected abstract void |
doDeclares() |
protected boolean |
doSend(Message<?> message,
long timeout)
Subclasses must implement this method.
|
protected AmqpAdmin |
getAdmin() |
protected AmqpTemplate |
getAmqpTemplate() |
protected ConnectionFactory |
getConnectionFactory() |
protected String |
getExchangeName()
Subclasses may override this method to return an Exchange name.
|
protected AmqpHeaderMapper |
getInboundHeaderMapper() |
protected RabbitTemplate |
getRabbitTemplate() |
protected String |
getRoutingKey()
Subclasses may override this method to return a routing key.
|
protected boolean |
isExtractPayload() |
boolean |
isLoggingEnabled() |
void |
onClose(Connection connection) |
void |
onCreate(Connection connection) |
protected void |
onInit()
Subclasses may implement this for initialization logic.
|
protected void |
setAdmin(AmqpAdmin admin) |
protected void |
setConnectionFactory(ConnectionFactory connectionFactory) |
void |
setDefaultDeliveryMode(MessageDeliveryMode defaultDeliveryMode)
Set the delivery mode to use if the message has no
"amqp_deliveryMode"
header and the message property was not set by the
MessagePropertiesConverter. |
void |
setExtractPayload(boolean extractPayload)
Set to true to extract the payload and map the headers; otherwise
the entire message is converted and sent.
|
void |
setHeadersMappedLast(boolean headersMappedLast)
When mapping headers for the outbound message, determine whether the headers are
mapped before the message is converted, or afterwards.
|
void |
setLoggingEnabled(boolean loggingEnabled) |
addInterceptor, addInterceptor, configureMetrics, getComponentType, getErrorRate, getFullChannelName, getIChannelInterceptorList, getInterceptors, getMaxSendDuration, getMeanErrorRate, getMeanErrorRatio, getMeanSendDuration, getMeanSendRate, getMetrics, getMetricsCaptor, getMinSendDuration, getOverrides, getSendCount, getSendCountLong, getSendDuration, getSendErrorCount, getSendErrorCountLong, getSendRate, getStandardDeviationSendDuration, getTimeSinceLastSend, isCountsEnabled, isStatsEnabled, registerMetricsCaptor, removeInterceptor, removeInterceptor, reset, send, send, setCountsEnabled, setDatatypes, setInterceptors, setMessageConverter, setShouldTrack, setStatsEnabledafterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitonShutDowngetBeanName, getComponentNamegetChannelInterceptorssendCount, sendErrorCountpublic boolean isLoggingEnabled()
isLoggingEnabled in interface IntegrationManagementisLoggingEnabled in class AbstractMessageChannelpublic void setLoggingEnabled(boolean loggingEnabled)
setLoggingEnabled in interface IntegrationManagementsetLoggingEnabled in class AbstractMessageChannelpublic void setDefaultDeliveryMode(MessageDeliveryMode defaultDeliveryMode)
MessagePropertiesConverter.defaultDeliveryMode - the default delivery mode.public void setExtractPayload(boolean extractPayload)
extractPayload - true to extract and map.protected boolean isExtractPayload()
setExtractPayload(boolean)public void setHeadersMappedLast(boolean headersMappedLast)
SimpleMessageConverter with a
String payload that contains json; the converter will set the content type to
text/plain which can be overridden to application/json by setting
the AmqpHeaders.CONTENT_TYPE message header.
Only applies when extractPayload is true.
Default: false.headersMappedLast - true if headers are mapped after conversion.protected String getExchangeName()
protected String getRoutingKey()
protected AmqpHeaderMapper getInboundHeaderMapper()
protected AmqpTemplate getAmqpTemplate()
protected RabbitTemplate getRabbitTemplate()
protected final void setAdmin(AmqpAdmin admin)
protected final void setConnectionFactory(ConnectionFactory connectionFactory)
protected AmqpAdmin getAdmin()
protected ConnectionFactory getConnectionFactory()
protected void onInit()
IntegrationObjectSupportonInit in class AbstractMessageChannelpublic void destroy()
destroy in interface DisposableBeandestroy in interface IntegrationManagementdestroy in class AbstractMessageChannelprotected boolean doSend(Message<?> message, long timeout)
AbstractMessageChanneldoSend in class AbstractMessageChannelmessage - The message.timeout - The timeout.public void onCreate(Connection connection)
onCreate in interface ConnectionListenerpublic void onClose(Connection connection)
onClose in interface ConnectionListenerprotected abstract void doDeclares()