public class ReadHandler extends JsonRequestHandler<JmxReadRequest>
Constructor and Description |
---|
ReadHandler(Restrictor pRestrictor)
Read handler constructor
|
Modifier and Type | Method and Description |
---|---|
protected void |
checkForRestriction(JmxReadRequest pRequest)
We override it here with a noop since we do a more fine grained
check during processing of the request.
|
Object |
doHandleRequest(MBeanServerConnection pServer,
JmxReadRequest pRequest)
Used for a request to a single attribute from a single MBean.
|
Object |
doHandleRequest(MBeanServerExecutor pServerManager,
JmxReadRequest pRequest)
Default implementation fo handling a request for multiple servers at once.
|
RequestType |
getType()
The type of request which can be served by this handler
|
boolean |
handleAllServersAtOnce(JmxReadRequest pRequest)
For a simple requests (one MBean, one attribute) we let the dispatching of the servers
done by the upper level.
|
checkForModifiedSince, checkType, getRestrictor, handleRequest, handleRequest, useReturnValueWithPath
public ReadHandler(Restrictor pRestrictor)
pRestrictor
- access restriction to applypublic RequestType getType()
JsonRequestHandler
getType
in class JsonRequestHandler<JmxReadRequest>
public boolean handleAllServersAtOnce(JmxReadRequest pRequest)
handleAllServersAtOnce
in class JsonRequestHandler<JmxReadRequest>
pRequest
- request to decide on whether to handle all request at oncepublic Object doHandleRequest(MBeanServerConnection pServer, JmxReadRequest pRequest) throws InstanceNotFoundException, AttributeNotFoundException, ReflectionException, MBeanException, IOException
doHandleRequest
in class JsonRequestHandler<JmxReadRequest>
pServer
- server on which to request the attributepRequest
- the request itself.InstanceNotFoundException
AttributeNotFoundException
ReflectionException
MBeanException
IOException
public Object doHandleRequest(MBeanServerExecutor pServerManager, JmxReadRequest pRequest) throws InstanceNotFoundException, AttributeNotFoundException, ReflectionException, MBeanException, IOException
JsonRequestHandler
true
on JsonRequestHandler.handleAllServersAtOnce(JmxRequest)
, needs to override this method.doHandleRequest
in class JsonRequestHandler<JmxReadRequest>
pServerManager
- all MBean servers found in this JVMpRequest
- the original requestInstanceNotFoundException
AttributeNotFoundException
ReflectionException
MBeanException
IOException
protected void checkForRestriction(JmxReadRequest pRequest)
checkForRestriction
in class JsonRequestHandler<JmxReadRequest>
pRequest
- request to checkCopyright © 2019. All rights reserved.