Examples of OConfigItem


Examples of org.collectd.api.OConfigItem

    Collectd.logDebug ("GenericJMX plugin: config: ci = " + ci + ";");

    children = ci.getChildren ();
    for (i = 0; i < children.size (); i++)
    {
      OConfigItem child;
      String key;

      child = children.get (i);
      key = child.getKey ();
      if (key.equalsIgnoreCase ("MBean"))
      {
        try
        {
          GenericJMXConfMBean mbean = new GenericJMXConfMBean (child);
View Full Code Here

Examples of org.collectd.api.OConfigItem

    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)
View Full Code Here

Examples of org.collectd.api.OConfigItem

    children = ci.getChildren ();
    iter = children.iterator ();
    while (iter.hasNext ())
    {
      OConfigItem child = iter.next ();

      Collectd.logDebug ("GenericJMXConfMBean: child.getKey () = "
          + child.getKey ());
      if (child.getKey ().equalsIgnoreCase ("ObjectName"))
      {
        String tmp = getConfigString (child);
        if (tmp == null)
          continue;

        try
        {
          this._obj_name = new ObjectName (tmp);
        }
        catch (MalformedObjectNameException e)
        {
          throw (new IllegalArgumentException ("Not a valid object name: "
                + tmp, e));
        }
      }
      else if (child.getKey ().equalsIgnoreCase ("InstancePrefix"))
      {
        String tmp = getConfigString (child);
        if (tmp != null)
          this._instance_prefix = tmp;
      }
      else if (child.getKey ().equalsIgnoreCase ("InstanceFrom"))
      {
        String tmp = getConfigString (child);
        if (tmp != null)
          this._instance_from.add (tmp);
      }
      else if (child.getKey ().equalsIgnoreCase ("Value"))
      {
        GenericJMXConfValue cv;

        cv = new GenericJMXConfValue (child);
        this._values.add (cv);
      }
      else
        throw (new IllegalArgumentException ("Unknown option: "
              + child.getKey ()));
    }

    if (this._obj_name == null)
      throw (new IllegalArgumentException ("No object name was defined."));
View Full Code Here

Examples of org.collectd.api.OConfigItem

     */
    children = ci.getChildren ();
    iter = children.iterator ();
    while (iter.hasNext ())
    {
      OConfigItem child = iter.next ();

      if (child.getKey ().equalsIgnoreCase ("Type"))
      {
        String tmp = getConfigString (child);
        if (tmp != null)
          this._ds_name = tmp;
      }
      else if (child.getKey ().equalsIgnoreCase ("Table"))
      {
        Boolean tmp = getConfigBoolean (child);
        if (tmp != null)
          this._is_table = tmp.booleanValue ();
      }
      else if (child.getKey ().equalsIgnoreCase ("Attribute"))
      {
        String tmp = getConfigString (child);
        if (tmp != null)
          this._attributes.add (tmp);
      }
      else if (child.getKey ().equalsIgnoreCase ("InstancePrefix"))
      {
        String tmp = getConfigString (child);
        if (tmp != null)
          this._instance_prefix = tmp;
      }
      else if (child.getKey ().equalsIgnoreCase ("InstanceFrom"))
      {
        String tmp = getConfigString (child);
        if (tmp != null)
          this._instance_from.add (tmp);
      }
      else
        throw (new IllegalArgumentException ("Unknown option: "
              + child.getKey ()));
    }

    if (this._ds_name == null)
      throw (new IllegalArgumentException ("No data set was defined."));
    else if (this._attributes.size () == 0)
View Full Code Here

Examples of org.collectd.api.OConfigItem

    Collectd.logDebug ("JMXMemory plugin: config: ci = " + ci + ";");

    children = ci.getChildren ();
    for (i = 0; i < children.size (); i++)
    {
      OConfigItem child;
      String key;

      child = children.get (i);
      key = child.getKey ();
      if (key.equalsIgnoreCase ("JMXServiceURL"))
      {
        configServiceURL (child);
      }
      else
View Full Code Here

Examples of org.collectd.api.OConfigItem

    Collectd.logDebug ("JMXMemory plugin: config: ci = " + ci + ";");

    children = ci.getChildren ();
    for (i = 0; i < children.size (); i++)
    {
      OConfigItem child;
      String key;

      child = children.get (i);
      key = child.getKey ();
      if (key.equalsIgnoreCase ("JMXServiceURL"))
      {
        configServiceURL (child);
      }
      else
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.