public abstract class AbstractAmqpChannel extends AbstractMessageChannel implements org.springframework.beans.factory.DisposableBean, org.springframework.amqp.rabbit.connection.ConnectionListener
AbstractMessageChannel.ChannelInterceptorListIntegrationManagement.ManagementOverridesinterceptorsEXPRESSION_PARSER, loggerMETER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
protected abstract void |
doDeclares() |
protected boolean |
doSend(org.springframework.messaging.Message<?> message,
long timeout)
Subclasses must implement this method.
|
protected org.springframework.amqp.core.AmqpAdmin |
getAdmin() |
protected org.springframework.amqp.core.AmqpTemplate |
getAmqpTemplate() |
protected org.springframework.amqp.rabbit.connection.ConnectionFactory |
getConnectionFactory() |
protected java.lang.String |
getExchangeName()
Subclasses may override this method to return an Exchange name.
|
protected AmqpHeaderMapper |
getInboundHeaderMapper() |
protected org.springframework.amqp.rabbit.core.RabbitTemplate |
getRabbitTemplate() |
protected java.lang.String |
getRoutingKey()
Subclasses may override this method to return a routing key.
|
protected boolean |
isExtractPayload() |
boolean |
isLoggingEnabled() |
void |
onClose(org.springframework.amqp.rabbit.connection.Connection connection) |
void |
onCreate(org.springframework.amqp.rabbit.connection.Connection connection) |
protected void |
onInit()
Subclasses may implement this for initialization logic.
|
protected void |
setAdmin(org.springframework.amqp.core.AmqpAdmin admin) |
protected void |
setConnectionFactory(org.springframework.amqp.rabbit.connection.ConnectionFactory connectionFactory) |
void |
setDefaultDeliveryMode(org.springframework.amqp.core.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, getChannelInterceptors, getComponentType, getErrorRate, getFullChannelName, 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, getApplicationContext, getApplicationContextId, getBeanFactory, 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, waitonShutDowngetComponentNamepublic boolean isLoggingEnabled()
isLoggingEnabled in interface IntegrationManagementisLoggingEnabled in class AbstractMessageChannelpublic void setLoggingEnabled(boolean loggingEnabled)
setLoggingEnabled in interface IntegrationManagementsetLoggingEnabled in class AbstractMessageChannelpublic void setDefaultDeliveryMode(org.springframework.amqp.core.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 java.lang.String getExchangeName()
protected java.lang.String getRoutingKey()
protected AmqpHeaderMapper getInboundHeaderMapper()
protected org.springframework.amqp.core.AmqpTemplate getAmqpTemplate()
protected org.springframework.amqp.rabbit.core.RabbitTemplate getRabbitTemplate()
protected final void setAdmin(org.springframework.amqp.core.AmqpAdmin admin)
protected final void setConnectionFactory(org.springframework.amqp.rabbit.connection.ConnectionFactory connectionFactory)
protected org.springframework.amqp.core.AmqpAdmin getAdmin()
protected org.springframework.amqp.rabbit.connection.ConnectionFactory getConnectionFactory()
protected void onInit()
throws java.lang.Exception
IntegrationObjectSupportonInit in class AbstractMessageChanneljava.lang.Exception - Any exception.public void destroy()
throws java.lang.Exception
destroy in interface org.springframework.beans.factory.DisposableBeanjava.lang.Exceptionprotected boolean doSend(org.springframework.messaging.Message<?> message,
long timeout)
AbstractMessageChanneldoSend in class AbstractMessageChannelmessage - The message.timeout - The timeout.public void onCreate(org.springframework.amqp.rabbit.connection.Connection connection)
onCreate in interface org.springframework.amqp.rabbit.connection.ConnectionListenerpublic void onClose(org.springframework.amqp.rabbit.connection.Connection connection)
onClose in interface org.springframework.amqp.rabbit.connection.ConnectionListenerprotected abstract void doDeclares()