Interface AmqpAdmin

  • All Known Implementing Classes:
    RabbitAdmin

    public interface AmqpAdmin
    Specifies a basic set of portable AMQP administrative operations for AMQP > 0.9.
    Author:
    Mark Pollack, Dave Syer, Gary Russell
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      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.
      java.lang.String declareQueue​(Queue queue)
      Declare the given queue.
      boolean deleteExchange​(java.lang.String exchangeName)
      Delete an exchange.
      boolean deleteQueue​(java.lang.String queueName)
      Delete a queue, without regard for whether it is in use or has messages on it.
      void deleteQueue​(java.lang.String queueName, boolean unused, boolean empty)
      Delete a queue.
      QueueInformation getQueueInfo​(java.lang.String queueName)
      Returns information about the queue, if it exists.
      java.util.Properties getQueueProperties​(java.lang.String queueName)
      Returns an implementation-specific Map of properties if the queue exists.
      default void initialize()
      Initialize the admin.
      int purgeQueue​(java.lang.String queueName)
      Purges the contents of the given queue.
      void purgeQueue​(java.lang.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​(java.lang.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

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

        @Nullable
        java.lang.String declareQueue​(Queue queue)
        Declare the given queue.
        Parameters:
        queue - the queue to declare.
        Returns:
        the name of the queue.
      • deleteQueue

        boolean deleteQueue​(java.lang.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​(java.lang.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​(java.lang.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.
      • purgeQueue

        int purgeQueue​(java.lang.String queueName)
        Purges the contents of the given queue.
        Parameters:
        queueName - the name of the queue.
        Returns:
        the number of messages purged.
        Since:
        2.1
      • 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.
      • getQueueProperties

        @Nullable
        java.util.Properties getQueueProperties​(java.lang.String queueName)
        Returns an implementation-specific Map of properties if the queue exists.
        Parameters:
        queueName - the name of the queue.
        Returns:
        the properties or null if the queue doesn't exist.
      • getQueueInfo

        @Nullable
        QueueInformation getQueueInfo​(java.lang.String queueName)
        Returns information about the queue, if it exists.
        Parameters:
        queueName - the name of the queue.
        Returns:
        the information or null if the queue doesn't exist.
      • initialize

        default void initialize()
        Initialize the admin.
        Since:
        2.1