public class PollableAmqpChannel extends AbstractAmqpChannel implements org.springframework.messaging.PollableChannel
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.| Constructor and Description |
|---|
PollableAmqpChannel(java.lang.String channelName,
org.springframework.amqp.core.AmqpTemplate amqpTemplate) |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
getRoutingKey()
Subclasses may override this method to return a routing key.
|
protected void |
onInit() |
org.springframework.messaging.Message<?> |
receive() |
org.springframework.messaging.Message<?> |
receive(long timeout) |
void |
setAmqpAdmin(org.springframework.amqp.core.AmqpAdmin amqpAdmin)
Provide an instance of AmqpAdmin for implicitly declaring Queues if the queueName is not provided.
|
void |
setQueueName(java.lang.String queueName)
Provide an explicitly configured queue name.
|
doSend, getExchangeNameaddInterceptor, addInterceptor, getChannelInterceptors, getComponentType, getFullChannelName, getInterceptors, removeInterceptor, removeInterceptor, send, send, setConversionService, setDatatypes, setInterceptors, setMessageConverter, setShouldTrackafterPropertiesSet, extractTypeIfPossible, getApplicationContext, getApplicationContextId, getBeanFactory, getChannelResolver, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setMessageBuilderFactory, setTaskScheduler, toStringpublic PollableAmqpChannel(java.lang.String channelName,
org.springframework.amqp.core.AmqpTemplate amqpTemplate)
public void setQueueName(java.lang.String queueName)
queueName - The queue name.public void setAmqpAdmin(org.springframework.amqp.core.AmqpAdmin amqpAdmin)
amqpAdmin - The amqp admin.protected void onInit()
throws java.lang.Exception
onInit in class org.springframework.integration.channel.AbstractMessageChanneljava.lang.Exceptionprotected java.lang.String getRoutingKey()
AbstractAmqpChannelgetRoutingKey in class AbstractAmqpChannelpublic org.springframework.messaging.Message<?> receive()
receive in interface org.springframework.messaging.PollableChannelpublic org.springframework.messaging.Message<?> receive(long timeout)
receive in interface org.springframework.messaging.PollableChannel