it.jnrpe.commands
Class CommandRepository

java.lang.Object
  extended by it.jnrpe.commands.CommandRepository

public final class CommandRepository
extends Object

This object manages all the configured commands.

Author:
Massimiliano Ziccardi

Constructor Summary
CommandRepository()
           
 
Method Summary
 void addCommandDefinition(CommandDefinition commandDef)
          Adds a new command definition to the repository.
 Set<CommandDefinition> getAllCommandDefinition(String pluginName)
          Returns all the command definition that involves the given plugin.
 Collection<CommandDefinition> getAllCommands()
           
 CommandDefinition getCommand(String commandName)
          Returns the named command definition.
 void removeCommandDefinition(CommandDefinition commandDef)
          Remove the given command definition from the command repository object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandRepository

public CommandRepository()
Method Detail

addCommandDefinition

public void addCommandDefinition(CommandDefinition commandDef)
Adds a new command definition to the repository.

Parameters:
commandDef - The command definition to be added

removeCommandDefinition

public void removeCommandDefinition(CommandDefinition commandDef)
Remove the given command definition from the command repository object.

Parameters:
commandDef - the command definition to be removed

getAllCommandDefinition

public Set<CommandDefinition> getAllCommandDefinition(String pluginName)
Returns all the command definition that involves the given plugin.

Parameters:
pluginName - the name of the plugin we are interested in
Returns:
all the command definition that involves the given plugin

getCommand

public CommandDefinition getCommand(String commandName)
Returns the named command definition.

Parameters:
commandName - The command name
Returns:
The command definition associated with sName. null if not found.

getAllCommands

public Collection<CommandDefinition> getAllCommands()
Returns:
all the installed commands.


Copyright © 2014. All Rights Reserved.