public class RabbitListenerEndpointRegistrar
extends java.lang.Object
implements org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean
RabbitListenerEndpoint with
a RabbitListenerEndpointRegistry.RabbitListenerConfigurer| Constructor and Description |
|---|
RabbitListenerEndpointRegistrar() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
RabbitListenerEndpointRegistry |
getEndpointRegistry() |
org.springframework.messaging.handler.annotation.support.MessageHandlerMethodFactory |
getMessageHandlerMethodFactory() |
protected void |
registerAllEndpoints() |
void |
registerEndpoint(RabbitListenerEndpoint endpoint)
Register a new
RabbitListenerEndpoint using the default
RabbitListenerContainerFactory to create the underlying container. |
void |
registerEndpoint(RabbitListenerEndpoint endpoint,
RabbitListenerContainerFactory<?> factory)
Register a new
RabbitListenerEndpoint alongside the
RabbitListenerContainerFactory to use to create the underlying container. |
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
A
BeanFactory only needs to be available in conjunction with
setContainerFactoryBeanName(java.lang.String). |
void |
setContainerFactory(RabbitListenerContainerFactory<?> containerFactory)
Set the
RabbitListenerContainerFactory to use in case a RabbitListenerEndpoint
is registered with a null container factory. |
void |
setContainerFactoryBeanName(java.lang.String containerFactoryBeanName)
Set the bean name of the
RabbitListenerContainerFactory to use in case
a RabbitListenerEndpoint is registered with a null container factory. |
void |
setEndpointRegistry(RabbitListenerEndpointRegistry endpointRegistry)
Set the
RabbitListenerEndpointRegistry instance to use. |
void |
setMessageHandlerMethodFactory(org.springframework.messaging.handler.annotation.support.MessageHandlerMethodFactory rabbitHandlerMethodFactory)
Set the
MessageHandlerMethodFactory to use to configure the message
listener responsible to serve an endpoint detected by this processor. |
public void setEndpointRegistry(RabbitListenerEndpointRegistry endpointRegistry)
RabbitListenerEndpointRegistry instance to use.endpointRegistry - the RabbitListenerEndpointRegistry instance to use.public RabbitListenerEndpointRegistry getEndpointRegistry()
RabbitListenerEndpointRegistry instance for this
registrar, may be null.public void setMessageHandlerMethodFactory(org.springframework.messaging.handler.annotation.support.MessageHandlerMethodFactory rabbitHandlerMethodFactory)
MessageHandlerMethodFactory to use to configure the message
listener responsible to serve an endpoint detected by this processor.
By default, DefaultMessageHandlerMethodFactory is used and it
can be configured further to support additional method arguments
or to customize conversion and validation support. See
DefaultMessageHandlerMethodFactory javadoc for more details.
rabbitHandlerMethodFactory - the MessageHandlerMethodFactory instance.public org.springframework.messaging.handler.annotation.support.MessageHandlerMethodFactory getMessageHandlerMethodFactory()
MessageHandlerMethodFactory to use, if any.public void setContainerFactory(RabbitListenerContainerFactory<?> containerFactory)
RabbitListenerContainerFactory to use in case a RabbitListenerEndpoint
is registered with a null container factory.
Alternatively, the bean name of the RabbitListenerContainerFactory to use
can be specified for a lazy lookup, see setContainerFactoryBeanName(java.lang.String).
containerFactory - the RabbitListenerContainerFactory instance.public void setContainerFactoryBeanName(java.lang.String containerFactoryBeanName)
RabbitListenerContainerFactory to use in case
a RabbitListenerEndpoint is registered with a null container factory.
Alternatively, the container factory instance can be registered directly:
see setContainerFactory(RabbitListenerContainerFactory).containerFactoryBeanName - the RabbitListenerContainerFactory bean name.setBeanFactory(org.springframework.beans.factory.BeanFactory)public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
BeanFactory only needs to be available in conjunction with
setContainerFactoryBeanName(java.lang.String).setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAwarebeanFactory - the BeanFactory instance.public void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanprotected void registerAllEndpoints()
public void registerEndpoint(RabbitListenerEndpoint endpoint, RabbitListenerContainerFactory<?> factory)
RabbitListenerEndpoint alongside the
RabbitListenerContainerFactory to use to create the underlying container.
The factory may be null if the default factory has to be
used for that endpoint.
endpoint - the RabbitListenerEndpoint instance to register.factory - the RabbitListenerContainerFactory to use.public void registerEndpoint(RabbitListenerEndpoint endpoint)
RabbitListenerEndpoint using the default
RabbitListenerContainerFactory to create the underlying container.endpoint - the RabbitListenerEndpoint instance to register.setContainerFactory(RabbitListenerContainerFactory),
registerEndpoint(RabbitListenerEndpoint, RabbitListenerContainerFactory)