Package org.jolokia.jvmagent.handler
Class JolokiaHttpHandler
java.lang.Object
org.jolokia.jvmagent.handler.JolokiaHttpHandler
- All Implemented Interfaces:
HttpHandler
HttpHandler for handling a Jolokia request
- Since:
- Mar 3, 2010
- Author:
- roland
-
Constructor Summary
ConstructorsConstructorDescriptionJolokiaHttpHandler(org.jolokia.server.core.service.api.JolokiaContext pJolokiaContext) Create a new HttpHandler for processing HTTP request -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckAuthentication(HttpExchange pHttpExchange) Protocol based authentication checks called very early and before handling a request.voiddoHandle(HttpExchange pExchange) Handler a request.voidhandle(HttpExchange pHttpExchange) Handler a request.
-
Constructor Details
-
JolokiaHttpHandler
public JolokiaHttpHandler(org.jolokia.server.core.service.api.JolokiaContext pJolokiaContext) Create a new HttpHandler for processing HTTP request- Parameters:
pJolokiaContext- jolokia context
-
-
Method Details
-
handle
Handler a request. If the handler is not yet started, an exception is thrown- Specified by:
handlein interfaceHttpHandler- Parameters:
pHttpExchange- the request/response object- Throws:
IOException- if something fails during handlingIllegalStateException- if the handler has not yet been started
-
checkAuthentication
Protocol based authentication checks called very early and before handling a request. If the check fails a security exception must be thrownThe default implementation does nothing and should be overridden for a valid check.
- Parameters:
pHttpExchange- exchange to check- Throws:
SecurityException- if check fails.
-
doHandle
Handler a request. If the handler is not yet started, an exception is thrown- Parameters:
pExchange- the request/response object- Throws:
IOException- if something fails during handlingIllegalStateException- if the handler has not yet been started
-