public class PollableAmqpChannel extends AbstractAmqpChannel implements 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.AbstractMessageChannel.ChannelInterceptorListlogger| 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()
Subclasses may implement this for initialization logic.
|
Message<?> |
receive()
Receive a message from this channel, blocking indefinitely if necessary.
|
Message<?> |
receive(long timeout)
Receive a message from this channel, blocking until either a message is
available or the specified timeout period elapses.
|
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, getComponentType, getFullChannelName, getInterceptors, send, send, setConversionService, setDatatypes, setInterceptors, setShouldTrackafterPropertiesSet, getApplicationContextId, getBeanFactory, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setTaskScheduler, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsend, sendgetComponentNamepublic PollableAmqpChannel(java.lang.String channelName,
org.springframework.amqp.core.AmqpTemplate amqpTemplate)
public void setQueueName(java.lang.String queueName)
public void setAmqpAdmin(org.springframework.amqp.core.AmqpAdmin amqpAdmin)
protected void onInit()
throws java.lang.Exception
IntegrationObjectSupportonInit in class IntegrationObjectSupportjava.lang.Exceptionprotected java.lang.String getRoutingKey()
AbstractAmqpChannelgetRoutingKey in class AbstractAmqpChannelpublic Message<?> receive()
PollableChannelreceive in interface PollableChannelMessage or null if interruptedpublic Message<?> receive(long timeout)
PollableChannelreceive in interface PollableChanneltimeout - the timeout in millisecondsMessage or null if the
specified timeout period elapses or the message reception is interrupted