children = ci.getChildren ();
iter = children.iterator ();
while (iter.hasNext ())
{
OConfigItem child = iter.next ();
if (child.getKey ().equalsIgnoreCase ("Host"))
{
String tmp = getConfigString (child);
if (tmp != null)
this._host = tmp;
}
else if (child.getKey ().equalsIgnoreCase ("User"))
{
String tmp = getConfigString (child);
if (tmp != null)
this._username = tmp;
}
else if (child.getKey ().equalsIgnoreCase ("Password"))
{
String tmp = getConfigString (child);
if (tmp != null)
this._password = tmp;
}
else if (child.getKey ().equalsIgnoreCase ("ServiceURL"))
{
String tmp = getConfigString (child);
if (tmp != null)
this._service_url = tmp;
}
else if (child.getKey ().equalsIgnoreCase ("InstancePrefix"))
{
String tmp = getConfigString (child);
if (tmp != null)
this._instance_prefix = tmp;
}
else if (child.getKey ().equalsIgnoreCase ("Collect"))
{
String tmp = getConfigString (child);
if (tmp != null)
{
GenericJMXConfMBean mbean;
mbean = GenericJMX.getMBean (tmp);
if (mbean == null)
throw (new IllegalArgumentException ("No such MBean defined: "
+ tmp + ". Please make sure all `MBean' blocks appear "
+ "before (above) all `Connection' blocks."));
Collectd.logDebug ("GenericJMXConfConnection: " + this._host + ": Add " + tmp);
this._mbeans.add (mbean);
}
}
else
throw (new IllegalArgumentException ("Unknown option: "
+ child.getKey ()));
}
if (this._service_url == null)
throw (new IllegalArgumentException ("No service URL was defined."));
if (this._mbeans.size () == 0)