com.philemonworks.selfdiagnose
Class SelfDiagnoseServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.philemonworks.selfdiagnose.SelfDiagnoseServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class SelfDiagnoseServlet
extends javax.servlet.http.HttpServlet

SelfDiagnoseServlet is a server component that can run and report on all registered diagnostic tasks.
Queries:

Request parameters:

Author:
emicklei
See Also:
Serialized Form

Constructor Summary
SelfDiagnoseServlet()
           
 
Method Summary
protected  void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
protected  void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
          Accept the configuration that is POSTed by the request.
static javax.servlet.http.HttpServletRequest getCurrentRequest()
           
static javax.servlet.http.HttpSession getCurrentSession()
           
 DiagnoseRunReporter getReporter(String format)
           
static String getWebApplicationName()
           
 void run(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
          Run all diagnostic tasks
static void setCurrentRequest(javax.servlet.http.HttpServletRequest request)
          Store the current request in a threadlocal variable.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelfDiagnoseServlet

public SelfDiagnoseServlet()
Method Detail

getCurrentSession

public static javax.servlet.http.HttpSession getCurrentSession()
Returns:
HttpSession the current session

setCurrentRequest

public static void setCurrentRequest(javax.servlet.http.HttpServletRequest request)
Store the current request in a threadlocal variable.

Parameters:
request - HttpServletRequest

getCurrentRequest

public static javax.servlet.http.HttpServletRequest getCurrentRequest()
Returns:
HttpServletRequest the current request

getWebApplicationName

public static String getWebApplicationName()

doGet

protected void doGet(javax.servlet.http.HttpServletRequest req,
                     javax.servlet.http.HttpServletResponse resp)
              throws javax.servlet.ServletException,
                     IOException
Overrides:
doGet in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
IOException

run

public void run(javax.servlet.http.HttpServletRequest req,
                javax.servlet.http.HttpServletResponse resp)
         throws javax.servlet.ServletException,
                IOException
Run all diagnostic tasks

Parameters:
req - : HttpServletRequest
resp - : HttpServletResponse
Throws:
javax.servlet.ServletException
IOException

getReporter

public DiagnoseRunReporter getReporter(String format)

doPost

protected void doPost(javax.servlet.http.HttpServletRequest req,
                      javax.servlet.http.HttpServletResponse resp)
               throws javax.servlet.ServletException,
                      IOException
Accept the configuration that is POSTed by the request.

Overrides:
doPost in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
IOException


Copyright © 2012. All Rights Reserved.