com.jamonapi.http
Class JAMonJettyHandler

java.lang.Object
  extended by org.mortbay.component.AbstractLifeCycle
      extended by org.mortbay.jetty.handler.AbstractHandler
          extended by org.mortbay.jetty.handler.AbstractHandlerContainer
              extended by org.mortbay.jetty.handler.HandlerWrapper
                  extended by com.jamonapi.http.JAMonJettyHandler
All Implemented Interfaces:
org.mortbay.component.LifeCycle, org.mortbay.jetty.Handler, org.mortbay.jetty.HandlerContainer

public class JAMonJettyHandler
extends org.mortbay.jetty.handler.HandlerWrapper


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.mortbay.component.LifeCycle
org.mortbay.component.LifeCycle.Listener
 
Field Summary
 
Fields inherited from class org.mortbay.jetty.handler.AbstractHandler
_string
 
Fields inherited from class org.mortbay.component.AbstractLifeCycle
_listeners
 
Fields inherited from interface org.mortbay.jetty.Handler
ALL, DEFAULT, ERROR, FORWARD, INCLUDE, REQUEST
 
Constructor Summary
JAMonJettyHandler()
           
 
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.
 int getSize()
           
 java.lang.String getSummaryLabels()
           
 void handle(java.lang.String target, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, int dispatch)
          Monitor the request and call any other requests in the decorator chain
 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.mortbay.jetty.handler.HandlerWrapper
addHandler, doStart, doStop, expandChildren, getHandler, removeHandler, setHandler, setServer
 
Methods inherited from class org.mortbay.jetty.handler.AbstractHandlerContainer
expandHandler, getChildHandlerByClass, getChildHandlers, getChildHandlersByClass
 
Methods inherited from class org.mortbay.jetty.handler.AbstractHandler
destroy, getServer, toString
 
Methods inherited from class org.mortbay.component.AbstractLifeCycle
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mortbay.component.LifeCycle
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
 

Constructor Detail

JAMonJettyHandler

public JAMonJettyHandler()
Method Detail

handle

public void handle(java.lang.String target,
                   javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response,
                   int dispatch)
            throws java.io.IOException,
                   javax.servlet.ServletException
Monitor the request and call any other requests in the decorator chain

Specified by:
handle in interface org.mortbay.jetty.Handler
Overrides:
handle in class org.mortbay.jetty.handler.HandlerWrapper
Throws:
java.io.IOException
javax.servlet.ServletException

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