public class JmsListenerEndpointRegistrar extends java.lang.Object implements BeanFactoryAware, InitializingBean
JmsListenerEndpoint
with a JmsListenerEndpointRegistry
.JmsListenerConfigurer
Constructor and Description |
---|
JmsListenerEndpointRegistrar() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet()
Invoked by the containing
BeanFactory after it has set all bean properties
and satisfied BeanFactoryAware , ApplicationContextAware etc. |
JmsListenerEndpointRegistry |
getEndpointRegistry()
Return the
JmsListenerEndpointRegistry instance for this
registrar, may be null . |
MessageHandlerMethodFactory |
getMessageHandlerMethodFactory()
Return the custom
MessageHandlerMethodFactory to use, if any. |
protected void |
registerAllEndpoints() |
void |
registerEndpoint(JmsListenerEndpoint endpoint)
Register a new
JmsListenerEndpoint using the default
JmsListenerContainerFactory to create the underlying container. |
void |
registerEndpoint(JmsListenerEndpoint endpoint,
JmsListenerContainerFactory<?> factory)
Register a new
JmsListenerEndpoint alongside the
JmsListenerContainerFactory to use to create the underlying container. |
void |
setBeanFactory(BeanFactory beanFactory)
A
BeanFactory only needs to be available in conjunction with
setContainerFactoryBeanName(java.lang.String) . |
void |
setContainerFactory(JmsListenerContainerFactory<?> containerFactory)
Set the
JmsListenerContainerFactory to use in case a JmsListenerEndpoint
is registered with a null container factory. |
void |
setContainerFactoryBeanName(java.lang.String containerFactoryBeanName)
Set the bean name of the
JmsListenerContainerFactory to use in case
a JmsListenerEndpoint is registered with a null container factory. |
void |
setEndpointRegistry(JmsListenerEndpointRegistry endpointRegistry)
Set the
JmsListenerEndpointRegistry instance to use. |
void |
setMessageHandlerMethodFactory(MessageHandlerMethodFactory messageHandlerMethodFactory)
Set the
MessageHandlerMethodFactory to use to configure the message
listener responsible to serve an endpoint detected by this processor. |
public void setEndpointRegistry(@Nullable JmsListenerEndpointRegistry endpointRegistry)
JmsListenerEndpointRegistry
instance to use.@Nullable public JmsListenerEndpointRegistry getEndpointRegistry()
JmsListenerEndpointRegistry
instance for this
registrar, may be null
.public void setMessageHandlerMethodFactory(@Nullable MessageHandlerMethodFactory messageHandlerMethodFactory)
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.
@Nullable public MessageHandlerMethodFactory getMessageHandlerMethodFactory()
MessageHandlerMethodFactory
to use, if any.public void setContainerFactory(JmsListenerContainerFactory<?> containerFactory)
JmsListenerContainerFactory
to use in case a JmsListenerEndpoint
is registered with a null
container factory.
Alternatively, the bean name of the JmsListenerContainerFactory
to use
can be specified for a lazy lookup, see setContainerFactoryBeanName(java.lang.String)
.
public void setContainerFactoryBeanName(java.lang.String containerFactoryBeanName)
JmsListenerContainerFactory
to use in case
a JmsListenerEndpoint
is registered with a null
container factory.
Alternatively, the container factory instance can be registered directly:
see setContainerFactory(JmsListenerContainerFactory)
.public void setBeanFactory(BeanFactory beanFactory)
BeanFactory
only needs to be available in conjunction with
setContainerFactoryBeanName(java.lang.String)
.setBeanFactory
in interface BeanFactoryAware
beanFactory
- owning BeanFactory (never null
).
The bean can immediately call methods on the factory.BeanInitializationException
public void afterPropertiesSet()
InitializingBean
BeanFactory
after it has set all bean properties
and satisfied BeanFactoryAware
, ApplicationContextAware
etc.
This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.
afterPropertiesSet
in interface InitializingBean
protected void registerAllEndpoints()
public void registerEndpoint(JmsListenerEndpoint endpoint, @Nullable JmsListenerContainerFactory<?> factory)
JmsListenerEndpoint
alongside the
JmsListenerContainerFactory
to use to create the underlying container.
The factory
may be null
if the default factory has to be
used for that endpoint.
public void registerEndpoint(JmsListenerEndpoint endpoint)
JmsListenerEndpoint
using the default
JmsListenerContainerFactory
to create the underlying container.