public abstract class AbstractRabbitListenerEndpoint extends Object implements RabbitListenerEndpoint, org.springframework.beans.factory.BeanFactoryAware
MethodRabbitListenerEndpoint,
SimpleRabbitListenerEndpoint| Constructor and Description |
|---|
AbstractRabbitListenerEndpoint() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract MessageListener |
createMessageListener(MessageListenerContainer container)
Create a
MessageListener that is able to serve this endpoint for the
specified container. |
RabbitAdmin |
getAdmin() |
protected org.springframework.beans.factory.config.BeanExpressionContext |
getBeanExpressionContext() |
protected org.springframework.beans.factory.BeanFactory |
getBeanFactory() |
protected org.springframework.expression.BeanResolver |
getBeanResolver() |
String |
getConcurrency()
The concurrency of this endpoint; Not used by this abstract class;
used by subclasses to set the concurrency appropriate for the container type.
|
protected StringBuilder |
getEndpointDescription() |
String |
getGroup() |
String |
getId() |
Integer |
getPriority() |
Collection<String> |
getQueueNames() |
Collection<Queue> |
getQueues() |
protected org.springframework.beans.factory.config.BeanExpressionResolver |
getResolver() |
boolean |
isExclusive() |
void |
setAdmin(RabbitAdmin admin)
Set the
RabbitAdmin instance to use. |
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) |
void |
setConcurrency(String concurrency)
Set the concurrency of this endpoint; usually overrides any concurrency
settings on the container factory.
|
void |
setExclusive(boolean exclusive)
Set if a single consumer in the container will have exclusive use of the
queues, preventing other consumers from receiving messages from the
queue(s).
|
void |
setGroup(String group)
Set the group for the corresponding listener container.
|
void |
setId(String id) |
void |
setPriority(Integer priority)
Set the priority of this endpoint.
|
void |
setQueueNames(String... queueNames)
Set the queue names to use.
|
void |
setQueues(Queue... queues)
Set the queues to use.
|
void |
setupListenerContainer(MessageListenerContainer listenerContainer)
Setup the specified message listener container with the model
defined by this endpoint.
|
String |
toString() |
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
throws org.springframework.beans.BeansException
setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAwareorg.springframework.beans.BeansExceptionprotected org.springframework.beans.factory.BeanFactory getBeanFactory()
protected org.springframework.beans.factory.config.BeanExpressionResolver getResolver()
protected org.springframework.expression.BeanResolver getBeanResolver()
protected org.springframework.beans.factory.config.BeanExpressionContext getBeanExpressionContext()
public void setId(String id)
public String getId()
getId in interface RabbitListenerEndpointRabbitListenerContainerFactory.createListenerContainer(org.springframework.amqp.rabbit.listener.RabbitListenerEndpoint)public void setQueues(Queue... queues)
Queue instances or the
queue names should be provided, but not both.queues - to set.setQueueNames(java.lang.String...)public Collection<Queue> getQueues()
public Collection<String> getQueueNames()
public void setQueueNames(String... queueNames)
Queue instances or the
queue names should be provided, but not both.queueNames - to set.setQueues(org.springframework.amqp.core.Queue...)public void setExclusive(boolean exclusive)
exclusive - the exclusive boolean flag.public boolean isExclusive()
boolean flag.public void setPriority(Integer priority)
priority - the priority value.public Integer getPriority()
null if
no priority is set.public void setConcurrency(String concurrency)
concurrency - the concurrency.public String getConcurrency()
getConcurrency in interface RabbitListenerEndpointpublic void setAdmin(RabbitAdmin admin)
RabbitAdmin instance to use.admin - the RabbitAdmin instance.public RabbitAdmin getAdmin()
RabbitAdmin instance to use or null if
none is configured.public String getGroup()
getGroup in interface RabbitListenerEndpointpublic void setGroup(String group)
group - the group.public void setupListenerContainer(MessageListenerContainer listenerContainer)
RabbitListenerEndpointThis endpoint must provide the requested missing option(s) of
the specified container to make it usable. Usually, this is about
setting the queues and the messageListener to
use but an implementation may override any default setting that
was already set.
setupListenerContainer in interface RabbitListenerEndpointlistenerContainer - the listener container to configureprotected abstract MessageListener createMessageListener(MessageListenerContainer container)
MessageListener that is able to serve this endpoint for the
specified container.container - the MessageListenerContainer to create a MessageListener.MessageListener instance.protected StringBuilder getEndpointDescription()
Available to subclasses, for inclusion in their toString() result.