public class RabbitMqPlugins extends Object
| Constructor and Description |
|---|
RabbitMqPlugins(EmbeddedRabbitMqConfig config) |
| Modifier and Type | Method and Description |
|---|---|
void |
disable(String plugin)
Disables the given plugin by executing
rabbitmq-plugins disable {plugin} and blocks until the call is
finished. |
void |
enable(String plugin)
Executes the command
rabbitmq-plugins enable {plugin} and blocks until the call finishes. |
Future<org.zeroturnaround.exec.ProcessResult> |
execute(String... arguments)
This method exposes a way to invoke '' command with any arguments.
|
Map<Plugin.State,Set<Plugin>> |
groupedList()
Same as
list() but it returns the plugins grouped by state. |
Map<String,Plugin> |
list()
Executes the
rabbitmq-plugins list command |
public RabbitMqPlugins(EmbeddedRabbitMqConfig config)
public Future<org.zeroturnaround.exec.ProcessResult> execute(String... arguments) throws RabbitMqCommandException
For example:
RabbitMqPlugins command = new RabbitMqPlugins(config);
command.execute("list", "-v", "management");
RabbitMqCommandException - if the command cannot be executedpublic Map<Plugin.State,Set<Plugin>> groupedList() throws RabbitMqCommandException
list() but it returns the plugins grouped by state.RabbitMqCommandExceptionpublic Map<String,Plugin> list()
rabbitmq-plugins list commandRabbitMqCommandException - if the command cannot be executed, it doesn't
finish in time or exits unexpectedlygroupedList()public void enable(String plugin) throws RabbitMqCommandException
rabbitmq-plugins enable {plugin} and blocks until the call finishes.plugin - the name of the plugin to enable.RabbitMqCommandException - if the command cannot be executed, it doesn't
finish in time or exits unexpectedlypublic void disable(String plugin) throws RabbitMqCommandException
rabbitmq-plugins disable {plugin} and blocks until the call is
finished.plugin - the name of the plugin to disable.RabbitMqCommandException - if the command cannot be executed, it doesn't
finish in time or exits unexpectedlyCopyright © 2016–2017. All rights reserved.