Package org.jolokia.service.jmx.handler
Class WriteHandler
java.lang.Object
org.jolokia.service.jmx.handler.AbstractCommandHandler<org.jolokia.server.core.request.JolokiaWriteRequest>
org.jolokia.service.jmx.handler.WriteHandler
- All Implemented Interfaces:
CommandHandler<org.jolokia.server.core.request.JolokiaWriteRequest>
public class WriteHandler
extends AbstractCommandHandler<org.jolokia.server.core.request.JolokiaWriteRequest>
Handler for dealing with write request.
- 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.JolokiaWriteRequest pRequest) Check whether there is a restriction on the type to apply.doHandleSingleServerRequest(MBeanServerConnection server, org.jolokia.server.core.request.JolokiaWriteRequest 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 handlerMethods inherited from class org.jolokia.service.jmx.handler.AbstractCommandHandler
checkForModifiedSince, checkType, destroy, doHandleAllServerRequest, handleAllServerRequest, handleAllServersAtOnce, handleSingleServerRequest, init, isObjectNameHidden
-
Constructor Details
-
WriteHandler
public WriteHandler()
-
-
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
-
checkForRestriction
protected void checkForRestriction(org.jolokia.server.core.request.JolokiaWriteRequest 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.JolokiaWriteRequest>- Parameters:
pRequest- request to check
-
doHandleSingleServerRequest
public Object doHandleSingleServerRequest(MBeanServerConnection server, org.jolokia.server.core.request.JolokiaWriteRequest request) throws InstanceNotFoundException, AttributeNotFoundException, ReflectionException, MBeanException, IOException Abstract method to be subclassed by a concrete handler for performing the request.- Specified by:
doHandleSingleServerRequestin classAbstractCommandHandler<org.jolokia.server.core.request.JolokiaWriteRequest>- Parameters:
server- server to tryrequest- request to process- Returns:
- the object result from the request
- Throws:
InstanceNotFoundExceptionAttributeNotFoundExceptionReflectionExceptionMBeanExceptionIOException
-