org.springframework.amqp.config
Class AbstractAmqpConfiguration
java.lang.Object
org.springframework.amqp.config.AbstractAmqpConfiguration
- All Implemented Interfaces:
- ApplicationContextAware, Lifecycle, Phased, SmartLifecycle
- Direct Known Subclasses:
- AbstractRabbitConfiguration
@Configuration
public abstract class AbstractAmqpConfiguration
- extends Object
- implements ApplicationContextAware, SmartLifecycle
Abstract base class for code based configuration of Spring managed AMQP infrastructure,
i.e. Exchanges, Queues, and Bindings.
Subclasses are required to provide an implementation of AmqpAdmin and randomNameQueueDefinition.
There are several convenience 'declare' methods to make the configuration in subclasses
more terse and readable.
The BindingBuilder class can be used to provide a fluent API to declare bindings.
- Author:
- Mark Pollack, Mark Fisher
- See Also:
AbstractExhange,
Queue,
Binding,
BindingBuilder
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
amqpAdmin
protected volatile AmqpAdmin amqpAdmin
AbstractAmqpConfiguration
public AbstractAmqpConfiguration()
amqpAdmin
@Bean
public abstract AmqpAdmin amqpAdmin()
defaultExchange
public DirectExchange defaultExchange()
- Provides convenient access to the default exchange which is always declared on the broker.
setApplicationContext
public void setApplicationContext(ApplicationContext applicationContext)
- Specified by:
setApplicationContext in interface ApplicationContextAware
isAutoStartup
public boolean isAutoStartup()
- Specified by:
isAutoStartup in interface SmartLifecycle
isRunning
public boolean isRunning()
- Specified by:
isRunning in interface Lifecycle
start
public void start()
- Specified by:
start in interface Lifecycle
stop
public void stop()
- Specified by:
stop in interface Lifecycle
stop
public void stop(Runnable callback)
- Specified by:
stop in interface SmartLifecycle
getPhase
public int getPhase()
- Specified by:
getPhase in interface Phased
Copyright © 2010. All Rights Reserved.