public class J4pReadRequest extends AbtractJ4pMBeanRequest
| Constructor and Description |
|---|
J4pReadRequest(J4pTargetConfig pTargetConfig,
ObjectName pObjectName,
String... pAttribute)
Create a READ request to request one or more attributes
from the remote j4p agent
|
J4pReadRequest(J4pTargetConfig pTargetConfig,
String pObjectName,
String... pAttribute)
Create a READ request to request one or more attributes
from the remote j4p agent
|
J4pReadRequest(ObjectName pObjectName,
String... pAttribute)
Create a READ request to request one or more attributes
from the remote j4p agent
|
J4pReadRequest(String pObjectName,
String... pAttribute)
Create a READ request to request one or more attributes
from the remote j4p agent
|
| Modifier and Type | Method and Description |
|---|---|
String |
getAttribute()
If this request is for a single attribute, this attribute is returned
by this getter.
|
Collection<String> |
getAttributes()
Get all attributes of this request.
|
String |
getPath()
Get the path for extracting parts of the return value
|
boolean |
hasAllAttributes()
Whether all attributes should be fetched
|
boolean |
hasSingleAttribute()
Whether this request represents a request for a single attribute
|
void |
setPath(String pPath)
Set the path for diving into the return value
|
getObjectNameaddPath, escape, getPreferredHttpMethod, getTargetConfig, getType, serializeArgumentToJson, serializeArgumentToRequestPart, setPreferredHttpMethod, splitPathpublic J4pReadRequest(ObjectName pObjectName, String... pAttribute)
pObjectName - Name of the MBean to request, which can be a pattern in
which case the given attributes are looked at all MBeans matched
by this pattern. If an attribute does not fit to a matched MBean it is
ignored.pAttribute - one or more attributes to request.public J4pReadRequest(J4pTargetConfig pTargetConfig, ObjectName pObjectName, String... pAttribute)
pTargetConfig - proxy target configuration or null if no proxy should be usedpObjectName - Name of the MBean to request, which can be a pattern in
which case the given attributes are looked at all MBeans matched
by this pattern. If an attribute does not fit to a matched MBean it is
ignored.pAttribute - one or more attributes to request.public J4pReadRequest(String pObjectName, String... pAttribute) throws MalformedObjectNameException
pObjectName - object name as sting which gets converted to a ObjectName}pAttribute - zero, one or more attributes to request.MalformedObjectNameException - when argument is not a valid object namepublic J4pReadRequest(J4pTargetConfig pTargetConfig, String pObjectName, String... pAttribute) throws MalformedObjectNameException
pTargetConfig - proxy target configuration or null if no proxy should be usedpObjectName - object name as sting which gets converted to a ObjectName}pAttribute - zero, one or more attributes to request.MalformedObjectNameException - when argument is not a valid object namepublic Collection<String> getAttributes()
public String getAttribute()
IllegalArgumentException - if no or more than one attribute are used when this request was
constructed.public boolean hasSingleAttribute()
public boolean hasAllAttributes()
public String getPath()
public void setPath(String pPath)
pPath - path to setCopyright © 2014. All rights reserved.