Class JolokiaHttpHandler

java.lang.Object
org.jolokia.jvmagent.handler.JolokiaHttpHandler
All Implemented Interfaces:
HttpHandler

public class JolokiaHttpHandler extends Object implements HttpHandler
HttpHandler for handling a Jolokia request
Since:
Mar 3, 2010
Author:
roland
  • 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

      public void handle(HttpExchange pHttpExchange) throws IOException
      Handler a request. If the handler is not yet started, an exception is thrown
      Specified by:
      handle in interface HttpHandler
      Parameters:
      pHttpExchange - the request/response object
      Throws:
      IOException - if something fails during handling
      IllegalStateException - if the handler has not yet been started
    • checkAuthentication

      protected void checkAuthentication(HttpExchange pHttpExchange) throws SecurityException
      Protocol based authentication checks called very early and before handling a request. If the check fails a security exception must be thrown

      The default implementation does nothing and should be overridden for a valid check.

      Parameters:
      pHttpExchange - exchange to check
      Throws:
      SecurityException - if check fails.
    • doHandle

      public void doHandle(HttpExchange pExchange) throws IOException
      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 handling
      IllegalStateException - if the handler has not yet been started