|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.catalina.valves.ValveBase
com.jamonapi.http.JAMonTomcatValve
public class JAMonTomcatValve
This valve works in tomcat 6 and jboss tomcat 5.5. An alternative approach is to use the jamontomcat-2.7.jar and this approach is required for tomcat 4/5. The Valve architecture and signatures were changed between release 5 and 5.5. For tomcat 5.5 this class should work in tomcats version of 5.5 but doesn't due to classloader issues. Instead put com.jamontomcatvalve.http.JAMonTomcat55Valve in your server/classes/com/jamontomcat/http directory and put jamon's jar in common/lib. This approach should also work in tomcat 6 though I didn't try it. This is a wrapper class for the true monitoring class of HttpMonFactory.
Note
<Engine name="Catalina" defaultHost="localhost" debug="0">
<Valve className="com.jamonapi.http.JAMonTomcatValve"/>
<Valve className="com.jamontomcat.JAMonTomcat5Valve" size="10000" summaryLabels="default"/>
<Valve className="com.jamonapi.http.JAMonTomcatValve" summaryLabels="request.getRequestURI().ms, response.getContentCount().bytes, response.getStatus().value.httpStatus">
<Valve className="com.jamonapi.http.JAMonTomcatValve summaryLabels="request.getRequestURI().ms, request.getRequestURI().value.ms, response.getContentCount().pageBytes,response.getStatus().httpStatusCode, response.getStatus().value.httpStatusCode, response.getContentType().value.type"/>
...
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, 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 |
---|
public JAMonTomcatValve()
Method Detail |
---|
public void invoke(org.apache.catalina.connector.Request request, org.apache.catalina.connector.Response response) throws java.io.IOException, javax.servlet.ServletException
process()
method to perform the actual filtering.
This method must be implemented by a concrete subclass.
invoke
in interface org.apache.catalina.Valve
invoke
in class org.apache.catalina.valves.ValveBase
request
- The servlet request to be processedresponse
- The servlet response to be created
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.htmlpublic void setSummaryLabels(java.lang.String jamonSummaryLabels)
public java.lang.String getSummaryLabels()
public void addSummaryLabel(java.lang.String jamonSummaryLabel)
public boolean getIgnoreHttpParams()
public void setIgnoreHttpParams(boolean ignoreHttpParams)
public void setEnabled(boolean enable)
public int getSize()
public boolean getEnabled()
public void setSize(int size)
public java.lang.String getInfo()
getInfo
in interface org.apache.catalina.Valve
getInfo
in class org.apache.catalina.valves.ValveBase
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |