it.jnrpe
Interface ICommandLine


public interface ICommandLine

This interface represents the command line received by plugin instances.

Author:
Massimiliano Ziccardi

Method Summary
 String getOptionValue(char shortOptionName)
          Returns the value of the specified option.
 String getOptionValue(char shortOptionName, String defaultValue)
          Returns the value of the specified option If the option is not present, returns the default value.
 String getOptionValue(String optionName)
          Returns the value of the specified option.
 String getOptionValue(String optionName, String defaultValue)
          Returns the value of the specified option.
 List<String> getOptionValues(char shortOptionName)
          Returns the values associated with the specified option.
 List<String> getOptionValues(String optionName)
          Returns the values associated with the specified option.
 boolean hasOption(char shortOptionName)
          Returns true if the option is present.
 boolean hasOption(String optionName)
          Returns true if the option is present.
 

Method Detail

getOptionValue

String getOptionValue(String optionName)
Returns the value of the specified option.

Parameters:
optionName - The option name
Returns:
The value of the option

getOptionValues

List<String> getOptionValues(String optionName)
Returns the values associated with the specified option.

Parameters:
optionName - The option name
Returns:
An ordered list of values

getOptionValue

String getOptionValue(String optionName,
                      String defaultValue)
Returns the value of the specified option. If the option is not present, returns the default value.

Parameters:
optionName - The option name
defaultValue - The default value
Returns:
The option value or, if not specified, the default value

getOptionValue

String getOptionValue(char shortOptionName)
Returns the value of the specified option.

Parameters:
shortOptionName - The option short name
Returns:
The option value

getOptionValues

List<String> getOptionValues(char shortOptionName)
Returns the values associated with the specified option.

Parameters:
shortOptionName - The option short name
Returns:
An ordered list of values

getOptionValue

String getOptionValue(char shortOptionName,
                      String defaultValue)
Returns the value of the specified option If the option is not present, returns the default value.

Parameters:
shortOptionName - The option short name
defaultValue - The default value
Returns:
The option value or, if not specified, the default value

hasOption

boolean hasOption(String optionName)
Returns true if the option is present.

Parameters:
optionName - The option name
Returns:
true if the option is present

hasOption

boolean hasOption(char shortOptionName)
Returns true if the option is present.

Parameters:
shortOptionName - The option short name
Returns:
true if the specified option is present


Copyright © 2014. All Rights Reserved.