public class VersionHandler extends JsonRequestHandler<JmxVersionRequest>
Constructor and Description |
---|
VersionHandler(Configuration pConfig,
Restrictor pRestrictor,
ServerHandle pServerHandle)
Constructor
|
Modifier and Type | Method and Description |
---|---|
protected void |
checkForRestriction(JmxVersionRequest pRequest)
Check whether there is a restriction on the type to apply.
|
Object |
doHandleRequest(MBeanServerConnection server,
JmxVersionRequest request)
Abstract method to be subclassed by a concrete handler for performing the
request.
|
Object |
doHandleRequest(MBeanServerExecutor serverManager,
JmxVersionRequest request)
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(JmxVersionRequest pRequest)
Override this if you want all servers as list in the argument, e.g.
|
checkForModifiedSince, checkType, getRestrictor, handleRequest, handleRequest, useReturnValueWithPath
public VersionHandler(Configuration pConfig, Restrictor pRestrictor, ServerHandle pServerHandle)
pConfig
- configuration holding additional meta data. Might be null.pRestrictor
- access restrictionspServerHandle
- a server handle as obtained from a ServerDetector
public RequestType getType()
getType
in class JsonRequestHandler<JmxVersionRequest>
protected void checkForRestriction(JmxVersionRequest pRequest)
checkForRestriction
in class JsonRequestHandler<JmxVersionRequest>
pRequest
- request to checkpublic boolean handleAllServersAtOnce(JmxVersionRequest pRequest)
handleAllServersAtOnce
in class JsonRequestHandler<JmxVersionRequest>
pRequest
- request to decide on whether to handle all request at onceJsonRequestHandler.doHandleRequest(MBeanServerConnection, JmxRequest)
(false
) or
JsonRequestHandler.doHandleRequest(MBeanServerExecutor, JmxRequest)
(true
) called.public Object doHandleRequest(MBeanServerExecutor serverManager, JmxVersionRequest request) throws InstanceNotFoundException, AttributeNotFoundException, ReflectionException, MBeanException, IOException
true
on JsonRequestHandler.handleAllServersAtOnce(JmxRequest)
, needs to override this method.doHandleRequest
in class JsonRequestHandler<JmxVersionRequest>
serverManager
- request
- InstanceNotFoundException
AttributeNotFoundException
ReflectionException
MBeanException
IOException
public Object doHandleRequest(MBeanServerConnection server, JmxVersionRequest request)
doHandleRequest
in class JsonRequestHandler<JmxVersionRequest>
server
- server to tryrequest
- request to processCopyright © 2017. All rights reserved.