public class PollableAmqpChannel extends AbstractAmqpChannel implements org.springframework.messaging.PollableChannel, org.springframework.integration.support.management.PollableChannelManagement, org.springframework.integration.channel.ExecutorChannelInterceptorAware
PollableChannel implementation that is backed by an AMQP Queue.
Messages will be sent to the default (no-name) exchange with that Queue's
name as the routing key.interceptors, meters| Constructor and Description |
|---|
PollableAmqpChannel(java.lang.String channelName,
org.springframework.amqp.core.AmqpTemplate amqpTemplate)
Construct an instance with the supplied name, template and default header mappers
used if the template is a
RabbitTemplate and the message is mapped. |
PollableAmqpChannel(java.lang.String channelName,
org.springframework.amqp.core.AmqpTemplate amqpTemplate,
AmqpHeaderMapper outboundMapper,
AmqpHeaderMapper inboundMapper)
Construct an instance with the supplied name, template and header mappers.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addInterceptor(org.springframework.messaging.support.ChannelInterceptor interceptor) |
void |
addInterceptor(int index,
org.springframework.messaging.support.ChannelInterceptor interceptor) |
protected void |
doDeclares() |
protected org.springframework.messaging.Message<?> |
doReceive(java.lang.Long timeout) |
int |
getReceiveCount() |
long |
getReceiveCountLong() |
int |
getReceiveErrorCount() |
long |
getReceiveErrorCountLong() |
protected java.lang.String |
getRoutingKey()
Subclasses may override this method to return a routing key.
|
boolean |
hasExecutorInterceptors() |
protected void |
onInit() |
protected java.lang.Object |
performReceive(java.lang.Long timeout) |
org.springframework.messaging.Message<?> |
receive() |
org.springframework.messaging.Message<?> |
receive(long timeout) |
boolean |
removeInterceptor(org.springframework.messaging.support.ChannelInterceptor interceptor) |
org.springframework.messaging.support.ChannelInterceptor |
removeInterceptor(int index) |
void |
setAmqpAdmin(org.springframework.amqp.core.AmqpAdmin amqpAdmin)
Provide an instance of AmqpAdmin for implicitly declaring Queues if the queueName is not provided.
|
void |
setInterceptors(java.util.List<org.springframework.messaging.support.ChannelInterceptor> interceptors) |
void |
setQueueName(java.lang.String queueName)
Provide an explicitly configured queue name.
|
destroy, doSend, getAdmin, getAmqpTemplate, getConnectionFactory, getExchangeName, getInboundHeaderMapper, getRabbitTemplate, isExtractPayload, isLoggingEnabled, onClose, onCreate, setAdmin, setConnectionFactory, setDefaultDeliveryMode, setExtractPayload, setHeadersMappedLast, setLoggingEnabledconfigureMetrics, getComponentType, getErrorRate, getFullChannelName, getIChannelInterceptorList, getIntegrationPatternType, getInterceptors, getMaxSendDuration, getMeanErrorRate, getMeanErrorRatio, getMeanSendDuration, getMeanSendRate, getMetrics, getMetricsCaptor, getMinSendDuration, getOverrides, getSendCount, getSendCountLong, getSendDuration, getSendErrorCount, getSendErrorCountLong, getSendRate, getStandardDeviationSendDuration, getTimeSinceLastSend, isCountsEnabled, isStatsEnabled, registerMetricsCaptor, reset, send, send, setCountsEnabled, setDatatypes, setMessageConverter, setShouldTrack, setStatsEnabledafterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, 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, waitreceiveCount, receiveErrorCountisStatsEnabled, setStatsEnableddestroy, getOverrides, isCountsEnabled, isLoggingEnabled, registerMetricsCaptor, reset, setCountsEnabled, setLoggingEnabledgetInterceptorsonShutDownpublic PollableAmqpChannel(java.lang.String channelName,
org.springframework.amqp.core.AmqpTemplate amqpTemplate)
RabbitTemplate and the message is mapped.channelName - the channel name.amqpTemplate - the template.AbstractAmqpChannel.setExtractPayload(boolean)public PollableAmqpChannel(java.lang.String channelName,
org.springframework.amqp.core.AmqpTemplate amqpTemplate,
AmqpHeaderMapper outboundMapper,
AmqpHeaderMapper inboundMapper)
channelName - the channel name.amqpTemplate - the template.outboundMapper - the outbound mapper.inboundMapper - the inbound mapper.AbstractAmqpChannel.setExtractPayload(boolean)public void setQueueName(java.lang.String queueName)
queueName - The queue name.public void setAmqpAdmin(org.springframework.amqp.core.AmqpAdmin amqpAdmin)
amqpAdmin - The amqp admin.public int getReceiveCount()
getReceiveCount in interface org.springframework.integration.support.management.PollableChannelManagementpublic long getReceiveCountLong()
getReceiveCountLong in interface org.springframework.integration.support.management.PollableChannelManagementpublic int getReceiveErrorCount()
getReceiveErrorCount in interface org.springframework.integration.support.management.PollableChannelManagementpublic long getReceiveErrorCountLong()
getReceiveErrorCountLong in interface org.springframework.integration.support.management.PollableChannelManagementprotected java.lang.String getRoutingKey()
AbstractAmqpChannelgetRoutingKey in class AbstractAmqpChannelprotected void onInit()
onInit in class AbstractAmqpChannelprotected void doDeclares()
doDeclares in class AbstractAmqpChannel@Nullable public org.springframework.messaging.Message<?> receive()
receive in interface org.springframework.messaging.PollableChannel@Nullable public org.springframework.messaging.Message<?> receive(long timeout)
receive in interface org.springframework.messaging.PollableChannel@Nullable protected org.springframework.messaging.Message<?> doReceive(java.lang.Long timeout)
@Nullable protected java.lang.Object performReceive(java.lang.Long timeout)
public void setInterceptors(java.util.List<org.springframework.messaging.support.ChannelInterceptor> interceptors)
setInterceptors in interface org.springframework.messaging.support.InterceptableChannelsetInterceptors in class org.springframework.integration.channel.AbstractMessageChannelpublic void addInterceptor(org.springframework.messaging.support.ChannelInterceptor interceptor)
addInterceptor in interface org.springframework.messaging.support.InterceptableChanneladdInterceptor in class org.springframework.integration.channel.AbstractMessageChannelpublic void addInterceptor(int index,
org.springframework.messaging.support.ChannelInterceptor interceptor)
addInterceptor in interface org.springframework.messaging.support.InterceptableChanneladdInterceptor in class org.springframework.integration.channel.AbstractMessageChannelpublic boolean removeInterceptor(org.springframework.messaging.support.ChannelInterceptor interceptor)
removeInterceptor in interface org.springframework.messaging.support.InterceptableChannelremoveInterceptor in class org.springframework.integration.channel.AbstractMessageChannel@Nullable public org.springframework.messaging.support.ChannelInterceptor removeInterceptor(int index)
removeInterceptor in interface org.springframework.messaging.support.InterceptableChannelremoveInterceptor in class org.springframework.integration.channel.AbstractMessageChannelpublic boolean hasExecutorInterceptors()
hasExecutorInterceptors in interface org.springframework.integration.channel.ExecutorChannelInterceptorAware