Spring AMQP

org.springframework.amqp.rabbit.admin
Interface RabbitBrokerOperations

All Known Implementing Classes:
RabbitBrokerAdmin

public interface RabbitBrokerOperations

Performs administration tasks for RabbitMQ broker administration.

Goal is to support full CRUD of Exchanges, Queues, Bindings, User, VHosts, etc.

Current implementations expose operations with basic type arguments via JMX.

Author:
Mark Pollack

Method Summary
 void addUser(String username, String password)
           
 int addVhost(String vhostPath)
           
 void changeUserPassword(String username, String newPassword)
           
 void clearPermissions(String username)
           
 void clearPermissions(String username, String vhostPath)
           
 void deleteUser(String username)
           
 int deleteVhost(String vhostPath)
           
 void forceResetNode()
          The forceResetNode command differs from resetNode() in that it resets the node unconditionally, regardless of the current management database state and cluster configuration.
 List<QueueInfo> getQueues()
           
 List<QueueInfo> getQueues(String virtualHost)
           
 RabbitStatus getStatus()
          Returns the status of the node.
 List<String> listPermissions()
           
 List<String> listPermissions(String vhostPath)
           
 List<String> listUserPermissions(String username)
           
 List<String> listUsers()
           
 void recoverAsync(boolean requeue)
           
 void resetNode()
          Removes the node from any cluster it belongs to, removes all data from the management database, such as configured users and vhosts, and deletes all persistent messages.
 void setPermissions(String username, Pattern configure, Pattern read, Pattern write)
           
 void setPermissions(String username, Pattern configure, Pattern read, Pattern write, String vhostPath)
           
 void startBrokerApplication()
          Starts the RabbitMQ application on an already running node.
 void startNode()
          Starts the Erlang node where RabbitMQ is running by shelling out to the directory specified by RABBITMQ_HOME and executing the standard named start script.
 void stopBrokerApplication()
          Stops the RabbitMQ application, leaving the Erlang node running.
 void stopNode()
          Stops the halts the Erlang node on which RabbitMQ is running.
 

Method Detail

getQueues

List<QueueInfo> getQueues()

getQueues

List<QueueInfo> getQueues(String virtualHost)

recoverAsync

void recoverAsync(boolean requeue)

addUser

void addUser(String username,
             String password)

deleteUser

void deleteUser(String username)

changeUserPassword

void changeUserPassword(String username,
                        String newPassword)

listUsers

List<String> listUsers()

addVhost

int addVhost(String vhostPath)

deleteVhost

int deleteVhost(String vhostPath)

setPermissions

void setPermissions(String username,
                    Pattern configure,
                    Pattern read,
                    Pattern write)

setPermissions

void setPermissions(String username,
                    Pattern configure,
                    Pattern read,
                    Pattern write,
                    String vhostPath)

clearPermissions

void clearPermissions(String username)

clearPermissions

void clearPermissions(String username,
                      String vhostPath)

listPermissions

List<String> listPermissions()

listPermissions

List<String> listPermissions(String vhostPath)

listUserPermissions

List<String> listUserPermissions(String username)

startBrokerApplication

void startBrokerApplication()
Starts the RabbitMQ application on an already running node. This command is typically run after performing other management actions that required the RabbitMQ application to be stopped, e.g. reset.


stopBrokerApplication

void stopBrokerApplication()
Stops the RabbitMQ application, leaving the Erlang node running.


startNode

void startNode()
Starts the Erlang node where RabbitMQ is running by shelling out to the directory specified by RABBITMQ_HOME and executing the standard named start script. It spawns the shell command execution into its own thread.


stopNode

void stopNode()
Stops the halts the Erlang node on which RabbitMQ is running. To restart the node you will need to execute the start script from a command line or via other means.


resetNode

void resetNode()
Removes the node from any cluster it belongs to, removes all data from the management database, such as configured users and vhosts, and deletes all persistent messages.

For resetNode() and forceResetNode() to succeed the RabbitMQ application must have been stopped, e.g. stopBrokerApplication()


forceResetNode

void forceResetNode()
The forceResetNode command differs from resetNode() in that it resets the node unconditionally, regardless of the current management database state and cluster configuration. It should only be used as a last resort if the database or cluster configuration has been corrupted.

For resetNode() and forceResetNode() to succeed the RabbitMQ application must have been stopped, e.g. stopBrokerApplication()


getStatus

RabbitStatus getStatus()
Returns the status of the node.

Returns:
status of the node.

Spring AMQP

Copyright © 2011. All Rights Reserved.