public abstract class AbstractRabbitListenerEndpoint extends Object implements RabbitListenerEndpoint
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 StringBuilder |
getEndpointDescription() |
String |
getId() |
Integer |
getPriority() |
Collection<String> |
getQueueNames() |
Collection<Queue> |
getQueues() |
boolean |
isExclusive() |
void |
setAdmin(RabbitAdmin admin)
Set the
RabbitAdmin instance to use. |
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 |
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 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 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 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.