Spring AMQP

org.springframework.amqp.core
Interface AmqpAdmin

All Known Implementing Classes:
RabbitAdmin

public interface AmqpAdmin

Specifies a basic set of portable AMQP administrative operations for AMQP > 0.8

Author:
Mark Pollack, Dave Syer

Method Summary
 void declareBinding(Binding binding)
          Declare a binding of a queue to an exchange.
 void declareExchange(Exchange exchange)
          Declare an exchange
 Queue declareQueue()
          Declare a queue whose name is automatically named.
 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
 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.
 

Method Detail

declareExchange

void declareExchange(Exchange exchange)
Declare an exchange

Parameters:
exchange - the exchange to declare.

deleteExchange

boolean deleteExchange(String exchangeName)
Delete an exchange. Look at implementation specific subclass for implementation specific behavior, for example for RabbitMQ this will delete the exchange without regard for whether it is in use or not.

Parameters:
exchangeName - the name of the exchange
Returns:
true if the exchange existed and was deleted

declareQueue

Queue declareQueue()
Declare a queue whose name is automatically named. It is created with exclusive = true, autoDelete=true, and durable = false.


declareQueue

void declareQueue(Queue queue)
Declare the given queue

Parameters:
queue - the queue to declare

deleteQueue

boolean deleteQueue(String queueName)
Delete a queue, without regard for whether it is in use or has messages on it

Parameters:
queueName - the name of the queue
Returns:
true if the queue existed and was deleted

deleteQueue

void deleteQueue(String queueName,
                 boolean unused,
                 boolean empty)
Delete a queue

Parameters:
queueName - the name of the queue
unused - true if the queue should be deleted only if not in use
empty - true if the queue should be deleted only if empty

purgeQueue

void purgeQueue(String queueName,
                boolean noWait)
Purges the contents of the given queue.

Parameters:
queueName - the name of the queue
noWait - true to not await completion of the purge

declareBinding

void declareBinding(Binding binding)
Declare a binding of a queue to an exchange.

Parameters:
binding - a description of the binding to declare.

removeBinding

void removeBinding(Binding binding)
Remove a binding of a queue to an exchange. Note unbindQueue/removeBinding was not introduced until 0.9 of the specification.

Parameters:
binding - a description of the binding to remove.

Spring AMQP

Copyright © 2011. All Rights Reserved.