|
Spring AMQP | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.amqp.rabbit.admin.RabbitBrokerAdmin
public class RabbitBrokerAdmin
Rabbit broker administration implementation exposed via JMX annotations.
Field Summary | |
---|---|
protected org.apache.commons.logging.Log |
logger
Logger available to subclasses |
Constructor Summary | |
---|---|
RabbitBrokerAdmin(ConnectionFactory connectionFactory)
|
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)
|
protected void |
createErlangTemplate(ConnectionFactory otpCf)
|
void |
declareBinding(Binding binding)
Declare a binding of a queue to an exchange. |
void |
declareExchange(Exchange exchange)
Declare an exchange |
void |
declareExchange(String exchangeName,
String exchangeType,
boolean durable,
boolean autoDelete)
Declare an exchange specifying its durability and auto-delete behavior. |
Queue |
declareQueue()
Declare a queue whose name is automatically named. |
void |
declareQueue(Queue queue)
Declare the given queue |
void |
deleteExchange(String exchangeName)
Delete an exchange. |
com.rabbitmq.client.AMQP.Exchange.DeleteOk |
deleteExchange(String exchangeName,
boolean ifUnused)
|
void |
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 |
deleteUser(String username)
|
int |
deleteVhost(String vhostPath)
|
void |
forceResetNode()
The forceResetNode command differs from RabbitBrokerOperations.resetNode() in that it resets the node unconditionally, regardless
of the current management database state and cluster configuration. |
ErlangTemplate |
getErlangTemplate()
|
List<QueueInfo> |
getQueues()
|
RabbitStatus |
getStatus()
Returns the status of the node. |
protected void |
initializeDefaultErlangTemplate(RabbitTemplate rabbitTemplate)
|
List<String> |
listPermissions()
|
List<String> |
listPermissions(String vhostPath)
|
List<String> |
listUserPermissions(String username)
|
List<String> |
listUsers()
|
void |
purgeQueue(String queueName,
boolean noWait)
Purges the contents of the given queue. |
void |
recoverAsync(boolean requeue)
|
void |
removeBinding(Binding binding)
|
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. |
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 RabbitBrokerAdmin(ConnectionFactory connectionFactory)
Method Detail |
---|
public void declareExchange(Exchange exchange)
AmqpAdmin
declareExchange
in interface AmqpAdmin
exchange
- the exchange to declare.@ManagedOperation public void declareExchange(String exchangeName, String exchangeType, boolean durable, boolean autoDelete)
exchangeName
- the name of the exchangeexchangeType
- the exchange typedurable
- true if we are declaring a durable exchange (the exchange will survive a server restart)autoDelete
- true if the server should delete the exchange when it is no longer in use@ManagedOperation(description="Delete a exchange, without regard for whether it is in use or has messages on it") @ManagedOperationParameters(value=) public void deleteExchange(String exchangeName)
AmqpAdmin
deleteExchange
in interface AmqpAdmin
exchangeName
- the name of the exchange@ManagedOperation public com.rabbitmq.client.AMQP.Exchange.DeleteOk deleteExchange(String exchangeName, boolean ifUnused)
deleteExchange
in interface RabbitBrokerOperations
@ManagedOperation public Queue declareQueue()
AmqpAdmin
declareQueue
in interface AmqpAdmin
@ManagedOperation public void declareQueue(Queue queue)
AmqpAdmin
declareQueue
in interface AmqpAdmin
queue
- the queue to declare@ManagedOperation public void 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 purgepublic List<QueueInfo> getQueues()
getQueues
in interface RabbitBrokerOperations
public void declareBinding(Binding binding)
AmqpAdmin
declareBinding
in interface AmqpAdmin
binding
- a description of the binding to declare.public void removeBinding(Binding binding)
removeBinding
in interface RabbitBrokerOperations
@ManagedOperation public void addUser(String username, String password)
addUser
in interface RabbitBrokerOperations
@ManagedOperation public void deleteUser(String username)
deleteUser
in interface RabbitBrokerOperations
@ManagedOperation public void changeUserPassword(String username, String newPassword)
changeUserPassword
in interface RabbitBrokerOperations
@ManagedOperation public List<String> listUsers()
listUsers
in interface RabbitBrokerOperations
public int addVhost(String vhostPath)
addVhost
in interface RabbitBrokerOperations
public int deleteVhost(String vhostPath)
deleteVhost
in interface RabbitBrokerOperations
public void setPermissions(String username, Pattern configure, Pattern read, Pattern write)
setPermissions
in interface RabbitBrokerOperations
public void setPermissions(String username, Pattern configure, Pattern read, Pattern write, String vhostPath)
setPermissions
in interface RabbitBrokerOperations
public void clearPermissions(String username)
clearPermissions
in interface RabbitBrokerOperations
public void clearPermissions(String username, String vhostPath)
clearPermissions
in interface RabbitBrokerOperations
public List<String> listPermissions()
listPermissions
in interface RabbitBrokerOperations
public List<String> listPermissions(String vhostPath)
listPermissions
in interface RabbitBrokerOperations
public List<String> listUserPermissions(String username)
listUserPermissions
in interface RabbitBrokerOperations
@ManagedOperation public void startBrokerApplication()
RabbitBrokerOperations
startBrokerApplication
in interface RabbitBrokerOperations
@ManagedOperation public void stopBrokerApplication()
RabbitBrokerOperations
stopBrokerApplication
in interface RabbitBrokerOperations
@ManagedOperation public void startNode()
RabbitBrokerOperations
startNode
in interface RabbitBrokerOperations
@ManagedOperation public void stopNode()
RabbitBrokerOperations
stopNode
in interface RabbitBrokerOperations
@ManagedOperation public void resetNode()
RabbitBrokerOperations
For RabbitBrokerOperations.resetNode()
and
RabbitBrokerOperations.forceResetNode()
to succeed the RabbitMQ application must have been stopped, e.g.
RabbitBrokerOperations.stopBrokerApplication()
resetNode
in interface RabbitBrokerOperations
@ManagedOperation public void forceResetNode()
RabbitBrokerOperations
RabbitBrokerOperations.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 RabbitBrokerOperations.resetNode()
and RabbitBrokerOperations.forceResetNode()
to succeed the RabbitMQ application must have been stopped, e.g. RabbitBrokerOperations.stopBrokerApplication()
forceResetNode
in interface RabbitBrokerOperations
@ManagedOperation public RabbitStatus getStatus()
RabbitBrokerOperations
getStatus
in interface RabbitBrokerOperations
public void recoverAsync(boolean requeue)
recoverAsync
in interface RabbitBrokerOperations
public ErlangTemplate getErlangTemplate()
protected void initializeDefaultErlangTemplate(RabbitTemplate rabbitTemplate)
protected void createErlangTemplate(ConnectionFactory otpCf)
|
Spring AMQP | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |