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() |
java.util.List<org.springframework.messaging.handler.invocation.HandlerMethodArgumentResolver> |
getCustomMethodArgumentResolvers()
Return the list of
HandlerMethodArgumentResolver. |
RabbitListenerEndpointRegistry |
getEndpointRegistry() |
org.springframework.messaging.handler.annotation.support.MessageHandlerMethodFactory |
getMessageHandlerMethodFactory() |
org.springframework.validation.Validator |
getValidator()
Get the validator, if supplied.
|
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 |
setCustomMethodArgumentResolvers(org.springframework.messaging.handler.invocation.HandlerMethodArgumentResolver... methodArgumentResolvers)
Add custom methods arguments resolvers to
RabbitListenerAnnotationBeanPostProcessor
Default empty list. |
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. |
void |
setValidator(org.springframework.validation.Validator validator)
Set the validator to use if the default message handler factory is used.
|
public void setEndpointRegistry(RabbitListenerEndpointRegistry endpointRegistry)
RabbitListenerEndpointRegistry instance to use.endpointRegistry - the RabbitListenerEndpointRegistry instance to use.@Nullable public RabbitListenerEndpointRegistry getEndpointRegistry()
RabbitListenerEndpointRegistry instance for this
registrar, may be null.public java.util.List<org.springframework.messaging.handler.invocation.HandlerMethodArgumentResolver> getCustomMethodArgumentResolvers()
HandlerMethodArgumentResolver.HandlerMethodArgumentResolver.public void setCustomMethodArgumentResolvers(org.springframework.messaging.handler.invocation.HandlerMethodArgumentResolver... methodArgumentResolvers)
RabbitListenerAnnotationBeanPostProcessor
Default empty list.methodArgumentResolvers - the methodArgumentResolvers to assign.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.@Nullable public org.springframework.validation.Validator getValidator()
public void setValidator(org.springframework.validation.Validator validator)
validator - the validator.public void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanprotected void registerAllEndpoints()
public void registerEndpoint(RabbitListenerEndpoint endpoint, @Nullable 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)