etm.contrib.integration.spring.web
Class SpringHttpConsoleServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by etm.contrib.integration.web.HttpConsoleServlet
              extended by etm.contrib.integration.spring.web.SpringHttpConsoleServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class SpringHttpConsoleServlet
extends HttpConsoleServlet

A servlet that provides access to aggregated performance statistics for spring managed EtmMonitor instances similar to a standalone HttpConsoleServer. The servlet requires the existence of an Spring WebApplicationContext that was created through a Spring ContextLoaderListener or ContextLoaderServlet (It should be possible to locate the WebApplicationContext with WebApplicationContextUtils.getRequiredWebApplicationContext()).

Usually the servlet is able to locate the EtmMonitor automatically, however if you have more than one EtmMonitor instance you need specify the monitor bean name as specified in your spring configuration. Therefore add the servlet init parameter called etmMonitorName holding its name.

Example:

 <servlet>
  <servlet-name>performanceMonitor</servlet-name>
  <servlet-class>etm.contrib.integration.spring.web.SpringHttpConsoleServlet</servlet-class>
  <init-param>
    <param-name>etmMonitorName</param-name>
    <param-value>myEtmMonitor</param-value>
  </init-param>
 </servlet>
 

Since:
1.2.0
Version:
$Revision: 59 $
Author:
void.fm
See Also:
Serialized Form

Field Summary
 
Fields inherited from class etm.contrib.integration.web.HttpConsoleServlet
actionRegistry, etmMonitor, EXPANDED_RESULTS, servletConfig
 
Constructor Summary
SpringHttpConsoleServlet()
           
 
Method Summary
protected  EtmMonitor getEtmMonitor()
           
 
Methods inherited from class etm.contrib.integration.web.HttpConsoleServlet
doGet, init
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringHttpConsoleServlet

public SpringHttpConsoleServlet()
Method Detail

getEtmMonitor

protected EtmMonitor getEtmMonitor()
                            throws javax.servlet.ServletException
Overrides:
getEtmMonitor in class HttpConsoleServlet
Throws:
javax.servlet.ServletException


Copyright © 2004,2005, 2006, 2007 void.fm. All Rights Reserved.