Back to index

munin  2.0.1
Public Member Functions | Package Functions | Private Attributes | Static Private Attributes
org.munin.plugin.jmx.Config Class Reference

List of all members.

Public Member Functions

String getIp ()
String getPort ()
String getCategory ()
String getUsername ()
String getPassword ()
String getPrefix ()
boolean isDirtyConfg ()
Map< String, Object > getConnectionCredentials ()

Package Functions

 Config (final String prefix)

Private Attributes

final String ip
final String port
final String category
final String username
final String password
final String prefix

Static Private Attributes

static final String IP_PARAM = "ip"
static final String PORT_PARAM = "port"
static final String CATEGORY_PARAM = "category"
static final String USERNAME_PARAM = "username"
static final String PASSWORD_PARAM = "password"

Detailed Description

Definition at line 8 of file Config.java.


Constructor & Destructor Documentation

org.munin.plugin.jmx.Config.Config ( final String  prefix) [inline, package]

Definition at line 23 of file Config.java.

                                   {
              ip = System.getenv(IP_PARAM);
              port = System.getenv(PORT_PARAM);
              String categoryEnv = System.getenv(CATEGORY_PARAM);
              username = System.getenv(USERNAME_PARAM);
              password = System.getenv(PASSWORD_PARAM);

              if (ip == null || port == null) {
                     String message = "The following parameters were not configured:"
                                   + (ip == null ? " ip" : "")
                                   + (port == null ? " port" : "");
                     throw new IllegalStateException(message);
              }
              if (categoryEnv == null) {
                     category = "jvm";
              } else {
                     category = categoryEnv;
              }
              if (prefix == null || prefix.length() == 0) {
                     this.prefix = "jmx"; 
              } else {
                     this.prefix = prefix;
              }
       }

Member Function Documentation

Definition at line 56 of file Config.java.

                                   {
              return category;
       }

Here is the caller graph for this function:

Map<String, Object> org.munin.plugin.jmx.Config.getConnectionCredentials ( ) [inline]

Definition at line 76 of file Config.java.

                                                             {

              Map<String, Object> credentials = null;

              if (username == null || password == null) {
                     return null;
              }

              credentials = new HashMap<String, Object>();

              credentials.put(JMXConnector.CREDENTIALS, new String[] { username,
                            password });
              return credentials;
       }
String org.munin.plugin.jmx.Config.getIp ( ) [inline]

Definition at line 48 of file Config.java.

                             {
              return ip;
       }

Definition at line 64 of file Config.java.

                                   {
              return password;
       }

Definition at line 52 of file Config.java.

                               {
              return port;
       }

Here is the caller graph for this function:

Definition at line 68 of file Config.java.

                                 {
              return prefix;
       }

Here is the caller graph for this function:

Definition at line 60 of file Config.java.

                                   {
              return username;
       }

Definition at line 72 of file Config.java.

                                     {
              return System.getenv("MUNIN_CAP_DIRTYCONFIG") != null;
       }

Here is the caller graph for this function:


Member Data Documentation

final String org.munin.plugin.jmx.Config.category [private]

Definition at line 18 of file Config.java.

final String org.munin.plugin.jmx.Config.CATEGORY_PARAM = "category" [static, private]

Definition at line 12 of file Config.java.

final String org.munin.plugin.jmx.Config.ip [private]

Definition at line 16 of file Config.java.

final String org.munin.plugin.jmx.Config.IP_PARAM = "ip" [static, private]

Definition at line 10 of file Config.java.

final String org.munin.plugin.jmx.Config.password [private]

Definition at line 20 of file Config.java.

final String org.munin.plugin.jmx.Config.PASSWORD_PARAM = "password" [static, private]

Definition at line 14 of file Config.java.

final String org.munin.plugin.jmx.Config.port [private]

Definition at line 17 of file Config.java.

final String org.munin.plugin.jmx.Config.PORT_PARAM = "port" [static, private]

Definition at line 11 of file Config.java.

final String org.munin.plugin.jmx.Config.prefix [private]

Definition at line 21 of file Config.java.

final String org.munin.plugin.jmx.Config.username [private]

Definition at line 19 of file Config.java.

final String org.munin.plugin.jmx.Config.USERNAME_PARAM = "username" [static, private]

Definition at line 13 of file Config.java.


The documentation for this class was generated from the following file: