Class JolokiaObjectNameRequest

java.lang.Object
org.jolokia.server.core.request.JolokiaRequest
org.jolokia.server.core.request.JolokiaObjectNameRequest
Direct Known Subclasses:
JolokiaExecRequest, JolokiaReadRequest, JolokiaSearchRequest, JolokiaWriteRequest

public abstract class JolokiaObjectNameRequest extends JolokiaRequest
Abstract Jolokia request which takes an object name.
Since:
15.03.11
Author:
roland
  • 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 type
      pName - object name, which must not be null.
      pPathParts - parts of an path
      pProcessingParams - optional init params
      pExclusive - 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 MalformedObjectNameException
      Constructor for POST requests
      Parameters:
      pRequestMap - object representation of the request
      pParams - processing parameters
      pExclusive - 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:
      toJSON in class JolokiaRequest
      Returns:
      JSON object representing this base request object
    • getInfo

      protected String getInfo()
      Description copied from class: JolokiaRequest
      Textual description of this request containing base information. Can be used in toString() methods of subclasses.
      Overrides:
      getInfo in class JolokiaRequest
      Returns:
      description of this base request
    • getObjectName

      public ObjectName getObjectName()
      Get the object name
      Returns:
      the object name
    • getProvider

      public String getProvider()
      Get the provider to be used with this request
      Returns:
      provider
    • getObjectNameAsString

      public String getObjectNameAsString()
      String representation of the object name for this request.
      Returns:
      the object name a string representation
    • getOrderedObjectName

      public String getOrderedObjectName(ObjectName pName)
      Name prepared according to requested formatting note. The key ordering can be influenced by the processing parameter ConfigKey.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