public class AgentServlet
extends javax.servlet.http.HttpServlet
It uses a REST based approach which translates a GET Url into a request. See the reference documentation for a detailed description of this servlet's features.
| Constructor and Description |
|---|
AgentServlet()
No argument constructor, used e.g. by an servlet
descriptor when creating the servlet out of web.xml
|
AgentServlet(Restrictor pRestrictor)
Constructor taking a restrictor to use
|
| Modifier and Type | Method and Description |
|---|---|
protected LogHandler |
createLogHandler(javax.servlet.ServletConfig pServletConfig,
boolean pDebug)
Create a log handler using this servlet's logging facility for logging.
|
protected Restrictor |
createRestrictor(String pLocation)
Create a restrictor restrictor to use.
|
void |
destroy() |
protected void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
protected void |
doOptions(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
OPTION requests are treated as CORS preflight requests
|
protected void |
doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
protected LogHandler |
getLogHandler()
Get the installed log handler
|
void |
init(javax.servlet.ServletConfig pServletConfig)
Initialize the backend systems, the log handler and the restrictor.
|
doDelete, doHead, doPut, doTrace, getLastModified, service, servicepublic AgentServlet()
public AgentServlet(Restrictor pRestrictor)
pRestrictor - restrictor to use or null if the restrictor
should be created in the default way (createRestrictor(String))protected LogHandler getLogHandler()
protected Restrictor createRestrictor(String pLocation)
ConfigKey.POLICY_LOCATION
or "/jolokia-access.xml" by default) and if not found an AllowAllRestrictor is
used by default. This method is called during the init(ServletConfig) when initializing
the subsystems and can be overridden for custom restrictor creation.pLocation - location to lookup the restrictorpublic void init(javax.servlet.ServletConfig pServletConfig)
throws javax.servlet.ServletException
createRestrictor(String) and createLogHandler(ServletConfig, boolean)init in interface javax.servlet.Servletinit in class javax.servlet.GenericServletpServletConfig - servlet configurationjavax.servlet.ServletExceptionprotected LogHandler createLogHandler(javax.servlet.ServletConfig pServletConfig, boolean pDebug)
createRestrictor(String) so the log handler
can already be used when building up the restrictor.pServletConfig - servlet config from where to get information to build up the log handlerpDebug - whether to print out debug information.public void destroy()
destroy in interface javax.servlet.Servletdestroy in class javax.servlet.GenericServletprotected void doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
IOException
doGet in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionprotected void doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
IOException
doPost in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionprotected void doOptions(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
IOException
doOptions in class javax.servlet.http.HttpServletreq - the original requestresp - the response the answer are written tojavax.servlet.ServletExceptionIOExceptionCopyright © 2014. All Rights Reserved.