Class JolokiaReadRequest


public class JolokiaReadRequest extends JolokiaObjectNameRequest
A JMX request for read operations, i.e. for reading JMX attributes on MBeans.
Since:
15.03.11
Author:
roland
  • Method Details

    • getAttributeName

      public String getAttributeName()
      Get a single attribute name. If this request was initialized with more than one attribute this methods throws an exception.
      Returns:
      the attribute's name or null
      Throws:
      IllegalStateException - if this request was initialized with more than one attribute.
    • getAttributeNames

      public List<String> getAttributeNames()
      Get the list of all attribute names.
      Returns:
      list of attributes names or null
    • isMultiAttributeMode

      public boolean isMultiAttributeMode()
      Whether this is a multi-attribute request, i.e. whether it contains one ore more attributes to fetch
      Returns:
      true if this is a multi attribute request, false otherwise.
    • hasAttribute

      public boolean hasAttribute()
      Whether this request has not multiple attribute names associated (which normally means, that all attributes should be fetched).
      Returns:
      true if not multiple attribute names are contained.
    • toJSON

      public org.json.simple.JSONObject toJSON()
      Convert this request to a JSON object, which can be used as a part of a return value.
      Overrides:
      toJSON in class JolokiaObjectNameRequest
      Returns:
      JSON object representing this base request object
    • toString

      public String toString()
      Overrides:
      toString in class Object