Package org.jolokia.server.core.request
Class JolokiaReadRequest
java.lang.Object
org.jolokia.server.core.request.JolokiaRequest
org.jolokia.server.core.request.JolokiaObjectNameRequest
org.jolokia.server.core.request.JolokiaReadRequest
A JMX request for
read operations, i.e. for reading JMX attributes
on MBeans.- Since:
- 15.03.11
- Author:
- roland
-
Method Summary
Modifier and TypeMethodDescriptionGet a single attribute name.Get the list of all attribute names.booleanWhether this request has not multiple attribute names associated (which normally means, that all attributes should be fetched).booleanWhether this is a multi-attribute request, i.e.org.json.simple.JSONObjecttoJSON()Convert this request to a JSON object, which can be used as a part of a return value.toString()Methods inherited from class org.jolokia.server.core.request.JolokiaObjectNameRequest
getInfo, getObjectName, getObjectNameAsString, getOrderedObjectName, getProviderMethods inherited from class org.jolokia.server.core.request.JolokiaRequest
getHttpMethod, getOption, getParameter, getParameterAsBool, getParameterAsInt, getPath, getPathParts, getType, getValueFaultHandler, isExclusive, useReturnValueWithPath
-
Method Details
-
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
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:
toJSONin classJolokiaObjectNameRequest- Returns:
- JSON object representing this base request object
-
toString
-