|
Spring AMQP | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.amqp.rabbit.core.RabbitAdmin
public class RabbitAdmin
RabbitMQ implementation of portable AMQP administrative operations for AMQP >= 0.9.1
Field Summary | |
---|---|
protected org.apache.commons.logging.Log |
logger
Logger available to subclasses |
Constructor Summary | |
---|---|
RabbitAdmin(ConnectionFactory connectionFactory)
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
If autoStartup is set to true, registers a callback on the
ConnectionFactory to declare all exchanges and queues in the enclosing application context. |
void |
declareBinding(Binding binding)
Declare a binding of a queue to an exchange. |
void |
declareExchange(Exchange exchange)
Declare an exchange |
Queue |
declareQueue()
Declares a server-named exclusive, autodelete, non-durable queue. |
void |
declareQueue(Queue queue)
Declare the given queue |
boolean |
deleteExchange(String exchangeName)
Delete an exchange. |
boolean |
deleteQueue(String queueName)
Delete a queue, without regard for whether it is in use or has messages on it |
void |
deleteQueue(String queueName,
boolean unused,
boolean empty)
Delete a queue |
RabbitTemplate |
getRabbitTemplate()
|
void |
initialize()
Declares all the exchanges, queues and bindings in the enclosing application context, if any. |
boolean |
isAutoStartup()
|
void |
purgeQueue(String queueName,
boolean noWait)
Purges the contents of the given queue. |
void |
removeBinding(Binding binding)
Remove a binding of a queue to an exchange. |
void |
setApplicationContext(ApplicationContext applicationContext)
|
void |
setAutoStartup(boolean autoStartup)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final org.apache.commons.logging.Log logger
Constructor Detail |
---|
public RabbitAdmin(ConnectionFactory connectionFactory)
Method Detail |
---|
public void setAutoStartup(boolean autoStartup)
public void setApplicationContext(ApplicationContext applicationContext)
setApplicationContext
in interface ApplicationContextAware
public RabbitTemplate getRabbitTemplate()
public void declareExchange(Exchange exchange)
AmqpAdmin
declareExchange
in interface AmqpAdmin
exchange
- the exchange to declare.@ManagedOperation public boolean deleteExchange(String exchangeName)
AmqpAdmin
deleteExchange
in interface AmqpAdmin
exchangeName
- the name of the exchange
@ManagedOperation public void declareQueue(Queue queue)
AmqpAdmin
declareQueue
in interface AmqpAdmin
queue
- the queue to declare@ManagedOperation public Queue declareQueue()
declareQueue
in interface AmqpAdmin
@ManagedOperation public boolean deleteQueue(String queueName)
AmqpAdmin
deleteQueue
in interface AmqpAdmin
queueName
- the name of the queue
@ManagedOperation public void deleteQueue(String queueName, boolean unused, boolean empty)
AmqpAdmin
deleteQueue
in interface AmqpAdmin
queueName
- the name of the queueunused
- true if the queue should be deleted only if not in useempty
- true if the queue should be deleted only if empty@ManagedOperation public void purgeQueue(String queueName, boolean noWait)
AmqpAdmin
purgeQueue
in interface AmqpAdmin
queueName
- the name of the queuenoWait
- true to not await completion of the purge@ManagedOperation public void declareBinding(Binding binding)
AmqpAdmin
declareBinding
in interface AmqpAdmin
binding
- a description of the binding to declare.@ManagedOperation public void removeBinding(Binding binding)
AmqpAdmin
removeBinding
in interface AmqpAdmin
binding
- a description of the binding to remove.public boolean isAutoStartup()
public void afterPropertiesSet()
autoStartup
is set to true, registers a callback on the
ConnectionFactory
to declare all exchanges and queues in the enclosing application context. If the
callback fails then it may cause other clients of the connection factory to fail, but since only exchanges,
queues and bindings are declared failure is not expected.
afterPropertiesSet
in interface InitializingBean
InitializingBean.afterPropertiesSet()
,
initialize()
public void initialize()
|
Spring AMQP | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |