com.jamonapi.http
Class JAMonTomcatValve

java.lang.Object
  extended by org.apache.catalina.valves.ValveBase
      extended by com.jamonapi.http.JAMonTomcatValve
All Implemented Interfaces:
javax.management.MBeanRegistration, org.apache.catalina.Contained, org.apache.catalina.Valve

public class JAMonTomcatValve
extends org.apache.catalina.valves.ValveBase


Field Summary
 
Fields inherited from class org.apache.catalina.valves.ValveBase
container, containerLog, controller, domain, info, mserver, next, oname, sm
 
Constructor Summary
JAMonTomcatValve()
           
 
Method Summary
 void addSummaryLabel(java.lang.String jamonSummaryLabel)
           
 boolean getEnabled()
           
 boolean getIgnoreHttpParams()
          Containers (tomcat/jetty etc) put jessionid (and other params) as part of what is returned by HttpServletRequest.getRequestURI, and HttpServletRequest.getRequestURL.
 java.lang.String getInfo()
           
 int getSize()
           
 java.lang.String getSummaryLabels()
           
 void invoke(org.apache.catalina.connector.Request request, org.apache.catalina.connector.Response response)
          Extract the desired request property, and pass it (along with the specified request and response objects) to the protected process() method to perform the actual filtering.
 void setEnabled(boolean enable)
          enable/disable monitoring.
 void setIgnoreHttpParams(boolean ignoreHttpParams)
          Containers (tomcat/jetty etc) put jessionid (and other params) as part of what is returned by HttpServletRequest.getRequestURI, and HttpServletRequest.getRequestURL.
 void setSize(int size)
          Set maximum number of rows that can be in jamon before no more records are added.
 void setSummaryLabels(java.lang.String jamonSummaryLabels)
           
 
Methods inherited from class org.apache.catalina.valves.ValveBase
backgroundProcess, createObjectName, event, getContainer, getContainerName, getController, getDomain, getNext, getObjectName, getParentName, postDeregister, postRegister, preDeregister, preRegister, setContainer, setController, setNext, setObjectName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JAMonTomcatValve

public JAMonTomcatValve()
Method Detail

invoke

public void invoke(org.apache.catalina.connector.Request request,
                   org.apache.catalina.connector.Response response)
            throws java.io.IOException,
                   javax.servlet.ServletException
Extract the desired request property, and pass it (along with the specified request and response objects) to the protected process() method to perform the actual filtering. This method must be implemented by a concrete subclass.

Specified by:
invoke in interface org.apache.catalina.Valve
Specified by:
invoke in class org.apache.catalina.valves.ValveBase
Parameters:
request - The servlet request to be processed
response - The servlet response to be created
Throws:
java.io.IOException - if an input/output error occurs
javax.servlet.ServletException - if a servlet error occurs http://www.jdocs.com/tomcat/5.5.17/org/apache/catalina/valves/RequestFilterValve.html log response, request to see what they do. debug mode? test xml - read property

setSummaryLabels

public void setSummaryLabels(java.lang.String jamonSummaryLabels)

getSummaryLabels

public java.lang.String getSummaryLabels()

addSummaryLabel

public void addSummaryLabel(java.lang.String jamonSummaryLabel)

getIgnoreHttpParams

public boolean getIgnoreHttpParams()
Containers (tomcat/jetty etc) put jessionid (and other params) as part of what is returned by HttpServletRequest.getRequestURI, and HttpServletRequest.getRequestURL. This can make many pages not unique enough to benefit from jamon, so by default this part of the url is removed from the monitoring label. Example this: /myapp/mypage.jsp;jsessionid=320sljsdofou becomes this in the jamon label: /myapp/mypage.jsp getIgnoreHttpParams() - return if this is enabled or disabled (true means the params will be removed/ignored. This is the default behaviour) setIgnoreHttpParams(boolean httpIgnoreParams) - set whether it is enabled or disabled (true means the params will be removed/ignored. This is the default behaviour)


setIgnoreHttpParams

public void setIgnoreHttpParams(boolean ignoreHttpParams)
Containers (tomcat/jetty etc) put jessionid (and other params) as part of what is returned by HttpServletRequest.getRequestURI, and HttpServletRequest.getRequestURL. This can make many pages not unique enough to benefit from jamon, so by default this part of the url is removed from the monitoring label. Example this: /myapp/mypage.jsp;jsessionid=320sljsdofou becomes this in the jamon label: /myapp/mypage.jsp getIgnoreHttpParams() - return if this is enabled or disabled (true means the params will be removed/ignored. This is the default behaviour) setIgnoreHttpParams(boolean httpIgnoreParams) - set whether it is enabled or disabled (true means the params will be removed/ignored. This is the default behaviour)


setEnabled

public void setEnabled(boolean enable)
enable/disable monitoring. Would be better to name them enable and isEnabled, but as far as I could tell tomcat can only initialize getter and setter methods.


getSize

public int getSize()

getEnabled

public boolean getEnabled()

setSize

public void setSize(int size)
Set maximum number of rows that can be in jamon before no more records are added. This will prevent jamon from growing unbounded


getInfo

public java.lang.String getInfo()
Specified by:
getInfo in interface org.apache.catalina.Valve
Overrides:
getInfo in class org.apache.catalina.valves.ValveBase