public class JolokiaHttpHandler extends Object implements com.sun.net.httpserver.HttpHandler
| Constructor and Description |
|---|
JolokiaHttpHandler(Configuration pConfig)
Create a new HttpHandler for processing HTTP request
|
JolokiaHttpHandler(Configuration pConfig,
LogHandler pLogHandler)
Create a new HttpHandler for processing HTTP request
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkAuthentication(com.sun.net.httpserver.HttpExchange pHttpExchange)
Protocol based authentication checks called very early and before handling a request.
|
protected Restrictor |
createRestrictor()
Hook for creating an own restrictor
|
void |
doHandle(com.sun.net.httpserver.HttpExchange pExchange) |
void |
handle(com.sun.net.httpserver.HttpExchange pHttpExchange)
Handle a request.
|
void |
start(boolean pLazy)
Start the handler
|
void |
start(boolean pLazy,
String pUrl,
boolean pSecured)
Start the handler and remember connection details which are useful for discovery messages
|
void |
stop()
Stop the handler
|
public JolokiaHttpHandler(Configuration pConfig)
pConfig - jolokia specific config tuning the processing behaviourpublic JolokiaHttpHandler(Configuration pConfig, LogHandler pLogHandler)
pConfig - jolokia specific config tuning the processing behaviourpLogHandler - log-handler the log handler to use for jolokiapublic void start(boolean pLazy)
pLazy - whether initialisation should be done lazy.protected Restrictor createRestrictor()
public void start(boolean pLazy,
String pUrl,
boolean pSecured)
pLazy - whether initialisation should be done lazy.pUrl - agent URLpSecured - whether the communication is secured or notpublic void stop()
public void handle(com.sun.net.httpserver.HttpExchange pHttpExchange)
throws IOException
handle in interface com.sun.net.httpserver.HttpHandlerpHttpExchange - the request/response objectIOException - if something fails during handlingIllegalStateException - if the handler has not yet been startedprotected void checkAuthentication(com.sun.net.httpserver.HttpExchange pHttpExchange)
throws SecurityException
pHttpExchange - exchange to checkSecurityException - if check fails.public void doHandle(com.sun.net.httpserver.HttpExchange pExchange)
throws IOException
IOExceptionCopyright © 2022. All rights reserved.