public final class JmxRequestFactory extends Object
JmxRequest
sModifier and Type | Method and Description |
---|---|
static <R extends JmxRequest> |
createGetRequest(String pPathInfo,
ProcessingParameters pProcessingParameters)
Create a JMX request from a GET Request with a REST Url.
|
static <R extends JmxRequest> |
createPostRequest(Map<String,?> pRequestMap,
ProcessingParameters pProcessingParams)
Create a single
JmxRequest s from a JSON map representation of a request |
static List<JmxRequest> |
createPostRequests(List pJsonRequests,
ProcessingParameters pProcessingParams)
Create a list of
JmxRequest s from a JSON list representing jmx requests |
public static <R extends JmxRequest> R createGetRequest(String pPathInfo, ProcessingParameters pProcessingParameters)
The REST-Url which gets recognized has the following format:
<base_url>/<type>/<param1>/<param2>/....
where
The following types are recognized so far, along with there parameters:
base_url
is the URL specifying the overall servlet (including
the servlet context, something like "http://localhost:8080/j4p-agent"),
type
the operational mode and param1 .. paramN
the provided parameters which are dependend on the
type
RequestType.READ
Parameters: param1
= MBean name,
param2
= Attribute name,
param3 ... paramN
= Inner Path.
The inner path is optional and specifies a path into complex MBean attributes
like collections or maps. If within collections/arrays/tabular data,
paramX
should specify
a numeric index, in maps/composite data paramX
is a used as a string
key.RequestType.WRITE
Parameters: param1
= MBean name, param2
= Attribute name,
param3
= value, param4 ... paramN
= Inner Path.
The value must be URL encoded (with UTF-8 as charset), and must be convertible into
a data structureRequestType.EXEC
Parameters: param1
= MBean name, param2
= operation name,
param4 ... paramN
= arguments for the operation.
The arguments must be URL encoded (with UTF-8 as charset), and must be convertable into
a data structureRequestType.VERSION
Parameters: none
RequestType.SEARCH
Parameters: param1
= MBean name pattern
pPathInfo
- path info of HTTP requestpProcessingParameters
- processing parameters. Must not be null/JmxRequest
public static <R extends JmxRequest> R createPostRequest(Map<String,?> pRequestMap, ProcessingParameters pProcessingParams)
JmxRequest
s from a JSON map representation of a requestpRequestMap
- JSON representation of a JmxRequest
pProcessingParams
- additional map of operational parameters. Must not be null.JmxRequest
public static List<JmxRequest> createPostRequests(List pJsonRequests, ProcessingParameters pProcessingParams)
JmxRequest
s from a JSON list representing jmx requestspJsonRequests
- JSON representation of a list of JmxRequest
pProcessingParams
- processing options. Must not be null.JmxRequest
Copyright © 2017. All rights reserved.