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, getExchangeName
addInterceptor, addInterceptor, getChannelInterceptors, getComponentType, getFullChannelName, getInterceptors, removeInterceptor, removeInterceptor, send, send, setConversionService, setDatatypes, setInterceptors, setMessageConverter, setShouldTrack
afterPropertiesSet, getApplicationContext, getApplicationContextId, getBeanFactory, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setMessageBuilderFactory, setTaskScheduler, toString
public 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.AbstractMessageChannel
java.lang.Exception
protected java.lang.String getRoutingKey()
AbstractAmqpChannel
getRoutingKey
in class AbstractAmqpChannel
public org.springframework.messaging.Message<?> receive()
receive
in interface org.springframework.messaging.PollableChannel
public org.springframework.messaging.Message<?> receive(long timeout)
receive
in interface org.springframework.messaging.PollableChannel