类 JmsListenerEndpointRegistrar
- java.lang.Object
- org.springframework.jms.config.JmsListenerEndpointRegistrar
- 所有已实现的接口:
Aware
,BeanFactoryAware
,InitializingBean
public class JmsListenerEndpointRegistrar extends Object implements BeanFactoryAware, InitializingBean
Helper bean for registeringJmsListenerEndpoint
with aJmsListenerEndpointRegistry
.- 从以下版本开始:
- 4.1
- 作者:
- Stephane Nicoll, Juergen Hoeller
- 另请参阅:
JmsListenerConfigurer
构造器概要
构造器 构造器 说明 JmsListenerEndpointRegistrar()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
afterPropertiesSet()
Invoked by the containingBeanFactory
after it has set all bean properties and satisfiedBeanFactoryAware
,ApplicationContextAware
etc.JmsListenerEndpointRegistry
getEndpointRegistry()
Return theJmsListenerEndpointRegistry
instance for this registrar, may benull
.MessageHandlerMethodFactory
getMessageHandlerMethodFactory()
Return the customMessageHandlerMethodFactory
to use, if any.protected void
registerAllEndpoints()
void
registerEndpoint(JmsListenerEndpoint endpoint)
Register a newJmsListenerEndpoint
using the defaultJmsListenerContainerFactory
to create the underlying container.void
registerEndpoint(JmsListenerEndpoint endpoint, JmsListenerContainerFactory<?> factory)
Register a newJmsListenerEndpoint
alongside theJmsListenerContainerFactory
to use to create the underlying container.void
setBeanFactory(BeanFactory beanFactory)
ABeanFactory
only needs to be available in conjunction withsetContainerFactoryBeanName(java.lang.String)
.void
setContainerFactory(JmsListenerContainerFactory<?> containerFactory)
Set theJmsListenerContainerFactory
to use in case aJmsListenerEndpoint
is registered with anull
container factory.void
setContainerFactoryBeanName(String containerFactoryBeanName)
Set the bean name of theJmsListenerContainerFactory
to use in case aJmsListenerEndpoint
is registered with anull
container factory.void
setEndpointRegistry(JmsListenerEndpointRegistry endpointRegistry)
Set theJmsListenerEndpointRegistry
instance to use.void
setMessageHandlerMethodFactory(MessageHandlerMethodFactory messageHandlerMethodFactory)
Set theMessageHandlerMethodFactory
to use to configure the message listener responsible to serve an endpoint detected by this processor.
构造器详细资料
JmsListenerEndpointRegistrar
public JmsListenerEndpointRegistrar()
方法详细资料
setEndpointRegistry
public void setEndpointRegistry(JmsListenerEndpointRegistry endpointRegistry)
Set theJmsListenerEndpointRegistry
instance to use.
getEndpointRegistry
public JmsListenerEndpointRegistry getEndpointRegistry()
Return theJmsListenerEndpointRegistry
instance for this registrar, may benull
.
setMessageHandlerMethodFactory
public void setMessageHandlerMethodFactory(MessageHandlerMethodFactory messageHandlerMethodFactory)
Set theMessageHandlerMethodFactory
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. SeeDefaultMessageHandlerMethodFactory
javadoc for more details.
getMessageHandlerMethodFactory
public MessageHandlerMethodFactory getMessageHandlerMethodFactory()
Return the customMessageHandlerMethodFactory
to use, if any.
setContainerFactory
public void setContainerFactory(JmsListenerContainerFactory<?> containerFactory)
Set theJmsListenerContainerFactory
to use in case aJmsListenerEndpoint
is registered with anull
container factory.Alternatively, the bean name of the
JmsListenerContainerFactory
to use can be specified for a lazy lookup, seesetContainerFactoryBeanName(java.lang.String)
.
setContainerFactoryBeanName
public void setContainerFactoryBeanName(String containerFactoryBeanName)
Set the bean name of theJmsListenerContainerFactory
to use in case aJmsListenerEndpoint
is registered with anull
container factory. Alternatively, the container factory instance can be registered directly: seesetContainerFactory(JmsListenerContainerFactory)
.
setBeanFactory
public void setBeanFactory(BeanFactory beanFactory)
ABeanFactory
only needs to be available in conjunction withsetContainerFactoryBeanName(java.lang.String)
.- 指定者:
setBeanFactory
在接口中BeanFactoryAware
- 参数:
beanFactory
- owning BeanFactory (nevernull
). The bean can immediately call methods on the factory.- 另请参阅:
BeanInitializationException
afterPropertiesSet
public void afterPropertiesSet()
从接口复制的说明:InitializingBean
Invoked by the containingBeanFactory
after it has set all bean properties and satisfiedBeanFactoryAware
,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
在接口中InitializingBean
registerAllEndpoints
protected void registerAllEndpoints()
registerEndpoint
public void registerEndpoint(JmsListenerEndpoint endpoint, JmsListenerContainerFactory<?> factory)
Register a newJmsListenerEndpoint
alongside theJmsListenerContainerFactory
to use to create the underlying container.The
factory
may benull
if the default factory has to be used for that endpoint.
registerEndpoint
public void registerEndpoint(JmsListenerEndpoint endpoint)
Register a newJmsListenerEndpoint
using the defaultJmsListenerContainerFactory
to create the underlying container.