Class ListHandler
java.lang.Object
org.jolokia.service.jmx.handler.AbstractCommandHandler<org.jolokia.server.core.request.JolokiaListRequest>
org.jolokia.service.jmx.handler.ListHandler
- All Implemented Interfaces:
CommandHandler<org.jolokia.server.core.request.JolokiaListRequest>
public class ListHandler
extends AbstractCommandHandler<org.jolokia.server.core.request.JolokiaListRequest>
Handler for obtaining a list of all available MBeans and its attributes
and operations.
- Since:
- Jun 12, 2009
- Author:
- roland
-
Field Summary
Fields inherited from class org.jolokia.service.jmx.handler.AbstractCommandHandler
context, pProvider -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckForRestriction(org.jolokia.server.core.request.JolokiaListRequest pRequest) Check whether there is a restriction on the type to apply.doHandleAllServerRequest(org.jolokia.server.core.util.jmx.MBeanServerAccess pServerManager, org.jolokia.server.core.request.JolokiaListRequest pRequest, Object pPreviousResult) Default implementation fo handling a request for multiple servers at once.doHandleSingleServerRequest(MBeanServerConnection server, org.jolokia.server.core.request.JolokiaListRequest request) Abstract method to be subclassed by a concrete handler for performing the request.org.jolokia.server.core.util.RequestTypegetType()The type of request which can be served by this handlerbooleanhandleAllServersAtOnce(org.jolokia.server.core.request.JolokiaListRequest pRequest) Return true since a list handler needs to merge all informationMethods inherited from class org.jolokia.service.jmx.handler.AbstractCommandHandler
checkForModifiedSince, checkType, destroy, handleAllServerRequest, handleSingleServerRequest, init, isObjectNameHidden
-
Constructor Details
-
ListHandler
public ListHandler()
-
-
Method Details
-
getType
public org.jolokia.server.core.util.RequestType getType()The type of request which can be served by this handler- Returns:
- the request typ of this handler
-
handleAllServersAtOnce
public boolean handleAllServersAtOnce(org.jolokia.server.core.request.JolokiaListRequest pRequest) Return true since a list handler needs to merge all information- Specified by:
handleAllServersAtOncein interfaceCommandHandler<org.jolokia.server.core.request.JolokiaListRequest>- Overrides:
handleAllServersAtOncein classAbstractCommandHandler<org.jolokia.server.core.request.JolokiaListRequest>- Parameters:
pRequest- request to decide on whether to handle all request at once- Returns:
- always true
-
checkForRestriction
protected void checkForRestriction(org.jolokia.server.core.request.JolokiaListRequest pRequest) Check whether there is a restriction on the type to apply. This method should be overwritten by specific handlers if they support a more sophisticated check than only for the type- Specified by:
checkForRestrictionin classAbstractCommandHandler<org.jolokia.server.core.request.JolokiaListRequest>- Parameters:
pRequest- request to check
-
doHandleAllServerRequest
public Object doHandleAllServerRequest(org.jolokia.server.core.util.jmx.MBeanServerAccess pServerManager, org.jolokia.server.core.request.JolokiaListRequest pRequest, Object pPreviousResult) throws IOException, org.jolokia.server.core.request.NotChangedException Default implementation fo handling a request for multiple servers at once. A subclass, which returns,trueonAbstractCommandHandler.handleAllServersAtOnce(JolokiaRequest), needs to override this method.- Overrides:
doHandleAllServerRequestin classAbstractCommandHandler<org.jolokia.server.core.request.JolokiaListRequest>- Parameters:
pServerManager- all MBean servers found in this JVMpRequest- the original requestpPreviousResult- a previous result which for merging requests can be used to merge files- Returns:
- the result of the the request.
- Throws:
IOExceptionorg.jolokia.server.core.request.NotChangedException
-
doHandleSingleServerRequest
public Object doHandleSingleServerRequest(MBeanServerConnection server, org.jolokia.server.core.request.JolokiaListRequest request) Abstract method to be subclassed by a concrete handler for performing the request.- Specified by:
doHandleSingleServerRequestin classAbstractCommandHandler<org.jolokia.server.core.request.JolokiaListRequest>- Parameters:
server- server to tryrequest- request to process- Returns:
- the object result from the request
-