Package org.jolokia.server.core.request
Class JolokiaObjectNameRequest
java.lang.Object
org.jolokia.server.core.request.JolokiaRequest
org.jolokia.server.core.request.JolokiaObjectNameRequest
- Direct Known Subclasses:
JolokiaExecRequest,JolokiaReadRequest,JolokiaSearchRequest,JolokiaWriteRequest
Abstract Jolokia request which takes an object name.
- Since:
- 15.03.11
- Author:
- roland
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJolokiaObjectNameRequest(Map<String, ?> pRequestMap, ProcessingParameters pParams, boolean pExclusive) Constructor for POST requestsprotectedJolokiaObjectNameRequest(RequestType pType, String pName, List<String> pPathParts, ProcessingParameters pProcessingParams, boolean pExclusive) Constructor for GET requests -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetInfo()Textual description of this request containing base information.Get the object nameString representation of the object name for this request.getOrderedObjectName(ObjectName pName) Name prepared according to requested formatting note.Get the provider to be used with this requestorg.json.simple.JSONObjecttoJSON()Convert this request to a JSON object, which can be used as a part of a return value.Methods inherited from class org.jolokia.server.core.request.JolokiaRequest
getHttpMethod, getOption, getParameter, getParameterAsBool, getParameterAsInt, getPath, getPathParts, getType, getValueFaultHandler, isExclusive, useReturnValueWithPath
-
Constructor Details
-
JolokiaObjectNameRequest
protected JolokiaObjectNameRequest(RequestType pType, String pName, List<String> pPathParts, ProcessingParameters pProcessingParams, boolean pExclusive) throws MalformedObjectNameException Constructor for GET requests- Parameters:
pType- request typepName- object name, which must not be null.pPathParts- parts of an pathpProcessingParams- optional init paramspExclusive- whether the request is an 'exclusive' request or not handled by a single handler only- Throws:
MalformedObjectNameException- if the given MBean name is not a valid object name
-
JolokiaObjectNameRequest
protected JolokiaObjectNameRequest(Map<String, ?> pRequestMap, ProcessingParameters pParams, boolean pExclusive) throws MalformedObjectNameExceptionConstructor for POST requests- Parameters:
pRequestMap- object representation of the requestpParams- processing parameterspExclusive- whether the request is an 'exclusive' request or not handled by a single handler only- Throws:
MalformedObjectNameException- if the given name (key: "name") is not a valid object name (with the provider part removed if given).
-
-
Method Details
-
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 classJolokiaRequest- Returns:
- JSON object representing this base request object
-
getInfo
Description copied from class:JolokiaRequestTextual description of this request containing base information. Can be used in toString() methods of subclasses.- Overrides:
getInfoin classJolokiaRequest- Returns:
- description of this base request
-
getObjectName
Get the object name- Returns:
- the object name
-
getProvider
Get the provider to be used with this request- Returns:
- provider
-
getObjectNameAsString
String representation of the object name for this request.- Returns:
- the object name a string representation
-
getOrderedObjectName
Name prepared according to requested formatting note. The key ordering can be influenced by the processing parameterConfigKey.CANONICAL_NAMING. If not given or set to "true", then the canonical order is used, if set to "initial" the name is given to construction time is used.- Parameters:
pName- name to format- Returns:
- formatted string
-