public class ListenerContainerFactory extends Object implements org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware
createContainer(SpringAMQPConsumerConfiguration)
is invoked, a new instance
of SimpleMessageListenerContainer
is created and configured with the properties set on this factory. For more
information about the setters in this class and their default values, revert to the documentation of the SimpleMessageListenerContainer
This class is not thread-safe and is meant to be used in a Spring Application Context.Constructor and Description |
---|
ListenerContainerFactory() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer |
createContainer(SpringAMQPConsumerConfiguration config)
Creates a new SimpleMessageListenerContainer, initialized with the properties set on this factory.
|
protected org.springframework.context.ApplicationContext |
getApplicationContext()
Returns the application context in which this bean is defined.
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setConnectionFactory(org.springframework.amqp.rabbit.connection.ConnectionFactory connectionFactory)
Sets the connection factory to use for the cluster
|
public org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer createContainer(SpringAMQPConsumerConfiguration config)
config
- The container-specific configuration for the new containerpublic void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
org.springframework.beans.BeansException
protected org.springframework.context.ApplicationContext getApplicationContext()
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
public void setConnectionFactory(org.springframework.amqp.rabbit.connection.ConnectionFactory connectionFactory)
connectionFactory
- the connection factory to setRabbitAccessor.setConnectionFactory(org.springframework.amqp.rabbit.connection.ConnectionFactory)
Copyright © 2010-2013. All Rights Reserved.