org.mmbase.bridge.jsp.taglib.debug
Class TimerTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
org.mmbase.bridge.jsp.taglib.ContextReferrerTag
org.mmbase.bridge.jsp.taglib.debug.TimerTag
- All Implemented Interfaces:
- javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag
- public class TimerTag
- extends ContextReferrerTag
Times how long the executing of the body took, and logs this.
Child elements can also time theirselves, and appear in the 'total
times' overview.
- Version:
- $Id: TimerTag.java,v 1.7.2.1 2004/07/05 17:20:02 michiel Exp $
- Author:
- Michiel Meeuwissen
- See Also:
- Serialized Form
| Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
bodyContent |
| Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
pageContext |
| Fields inherited from interface javax.servlet.jsp.tagext.BodyTag |
EVAL_BODY_BUFFERED, EVAL_BODY_TAG |
| Fields inherited from interface javax.servlet.jsp.tagext.IterationTag |
EVAL_BODY_AGAIN |
| Fields inherited from interface javax.servlet.jsp.tagext.Tag |
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
|
Method Summary |
int |
doAfterBody()
|
int |
doEndTag()
|
int |
doStartTag()
Initialize timer. |
long |
haltTimer(int handle)
Stops the timer identified by the handle, and logs and returns the result in second. |
void |
setName(java.lang.String n)
|
int |
startTimer(java.lang.String id)
|
int |
startTimer(java.lang.String id,
java.lang.String id2)
Starts a timer. |
| Methods inherited from class org.mmbase.bridge.jsp.taglib.ContextReferrerTag |
fillStandardParameters, findParentTag, findParentTag, findParentTag, findParentTag, findWriter, findWriter, getAttribute, getAttributeBoolean, getAttributeInteger, getAttributeInteger, getAttributeValue, getContentTag, getContextProvider, getContextTag, getId, getLocale, getObject, getPageContext, getReferid, getString, getWriterValue, haveBody, release, setContext, setEscape, setId, setJspvar, setPageContext, setReferid, setVartype, setWrite, setWriter |
| Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
doInitBody, getBodyContent, getPreviousOut, setBodyContent |
| Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
findAncestorWithClass, getParent, getValue, getValues, removeValue, setParent, setValue |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.servlet.jsp.tagext.Tag |
getParent, setParent |
TimerTag
public TimerTag()
setName
public void setName(java.lang.String n)
throws javax.servlet.jsp.JspTagException
- Throws:
javax.servlet.jsp.JspTagException
startTimer
public int startTimer(java.lang.String id,
java.lang.String id2)
throws javax.servlet.jsp.JspTagException
- Starts a timer.
- Parameters:
id - An id which optionally can be null. Can e.g. be getId().id2 - Another id which cannot be null. Something descriptive.
- Returns:
- an integer handle, which you need to remember to halt the timer.
- Throws:
javax.servlet.jsp.JspTagException
startTimer
public int startTimer(java.lang.String id)
throws javax.servlet.jsp.JspTagException
- Throws:
javax.servlet.jsp.JspTagException
haltTimer
public long haltTimer(int handle)
throws javax.servlet.jsp.JspTagException
- Stops the timer identified by the handle, and logs and returns the result in second.
- Throws:
javax.servlet.jsp.JspTagException
doStartTag
public int doStartTag()
throws javax.servlet.jsp.JspTagException
- Initialize timer.
- Throws:
javax.servlet.jsp.JspTagException
doAfterBody
public int doAfterBody()
throws javax.servlet.jsp.JspTagException
- Throws:
javax.servlet.jsp.JspTagException
doEndTag
public int doEndTag()
throws javax.servlet.jsp.JspTagException
- Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag- Overrides:
doEndTag in class ContextReferrerTag
- Throws:
javax.servlet.jsp.JspTagException
MMBase build 1.7.4.20050922