Package org.springframework.jms.config
Class JmsListenerEndpointRegistrar
java.lang.Object
org.springframework.jms.config.JmsListenerEndpointRegistrar
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.InitializingBean
public class JmsListenerEndpointRegistrar
extends Object
implements org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean
Helper bean for registering
JmsListenerEndpoint with a JmsListenerEndpointRegistry.- Since:
- 4.1
- Author:
- Stephane Nicoll, Juergen Hoeller
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidReturn theJmsListenerEndpointRegistryinstance for this registrar, may benull.org.springframework.messaging.handler.annotation.support.MessageHandlerMethodFactoryReturn the customMessageHandlerMethodFactoryto use, if any.protected voidvoidregisterEndpoint(JmsListenerEndpoint endpoint) Register a newJmsListenerEndpointusing the defaultJmsListenerContainerFactoryto create the underlying container.voidregisterEndpoint(JmsListenerEndpoint endpoint, JmsListenerContainerFactory<?> factory) Register a newJmsListenerEndpointalongside theJmsListenerContainerFactoryto use to create the underlying container.voidsetBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) ABeanFactoryonly needs to be available in conjunction withsetContainerFactoryBeanName(java.lang.String).voidsetContainerFactory(JmsListenerContainerFactory<?> containerFactory) Set theJmsListenerContainerFactoryto use in case aJmsListenerEndpointis registered with anullcontainer factory.voidsetContainerFactoryBeanName(String containerFactoryBeanName) Set the bean name of theJmsListenerContainerFactoryto use in case aJmsListenerEndpointis registered with anullcontainer factory.voidsetEndpointRegistry(JmsListenerEndpointRegistry endpointRegistry) Set theJmsListenerEndpointRegistryinstance to use.voidsetMessageHandlerMethodFactory(org.springframework.messaging.handler.annotation.support.MessageHandlerMethodFactory messageHandlerMethodFactory) Set theMessageHandlerMethodFactoryto use to configure the message listener responsible to serve an endpoint detected by this processor.
-
Constructor Details
-
JmsListenerEndpointRegistrar
public JmsListenerEndpointRegistrar()
-
-
Method Details
-
setEndpointRegistry
Set theJmsListenerEndpointRegistryinstance to use. -
getEndpointRegistry
Return theJmsListenerEndpointRegistryinstance for this registrar, may benull. -
setMessageHandlerMethodFactory
public void setMessageHandlerMethodFactory(@Nullable org.springframework.messaging.handler.annotation.support.MessageHandlerMethodFactory messageHandlerMethodFactory) Set theMessageHandlerMethodFactoryto use to configure the message listener responsible to serve an endpoint detected by this processor.By default,
DefaultMessageHandlerMethodFactoryis used and it can be configured further to support additional method arguments or to customize conversion and validation support. SeeDefaultMessageHandlerMethodFactoryjavadoc for more details. -
getMessageHandlerMethodFactory
@Nullable public org.springframework.messaging.handler.annotation.support.MessageHandlerMethodFactory getMessageHandlerMethodFactory()Return the customMessageHandlerMethodFactoryto use, if any. -
setContainerFactory
Set theJmsListenerContainerFactoryto use in case aJmsListenerEndpointis registered with anullcontainer factory.Alternatively, the bean name of the
JmsListenerContainerFactoryto use can be specified for a lazy lookup, seesetContainerFactoryBeanName(java.lang.String). -
setContainerFactoryBeanName
Set the bean name of theJmsListenerContainerFactoryto use in case aJmsListenerEndpointis registered with anullcontainer factory. Alternatively, the container factory instance can be registered directly: seesetContainerFactory(JmsListenerContainerFactory). -
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) ABeanFactoryonly needs to be available in conjunction withsetContainerFactoryBeanName(java.lang.String).- Specified by:
setBeanFactoryin interfaceorg.springframework.beans.factory.BeanFactoryAware
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
registerAllEndpoints
protected void registerAllEndpoints() -
registerEndpoint
public void registerEndpoint(JmsListenerEndpoint endpoint, @Nullable JmsListenerContainerFactory<?> factory) Register a newJmsListenerEndpointalongside theJmsListenerContainerFactoryto use to create the underlying container.The
factorymay benullif the default factory should be used for the supplied endpoint. -
registerEndpoint
Register a newJmsListenerEndpointusing the defaultJmsListenerContainerFactoryto create the underlying container.
-