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:
- Serializable, BodyTag, IterationTag, JspTag, Tag, TryCatchFinally
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 35335 2009-05-21 08:14:41Z michiel $
- Author:
- Michiel Meeuwissen
- See Also:
- Serialized Form
| Methods inherited from class org.mmbase.bridge.jsp.taglib.ContextReferrerTag |
appendMoreParameters, doCatch, doFinally, fillStandardParameters, findLoopOrQuery, findParentTag, findParentTag, findWriter, findWriter, getAttribute, getAttribute, getAttributeBoolean, getAttributeInteger, getAttributeInteger, getAttributeValue, getContentTag, getContextProvider, getContextTag, getCurrentBlock, getDefaultLocale, getEscapedValue, getFormTag, getId, getLocale, getLocaleFromContext, getObject, getObjectConditional, getPageContext, getPageContextTag, getQuery, getReferid, getString, getTaglibVersion, getThreadPageContext, getTimeZone, getWriterValue, haveBody, release, setContext, setEscape, setId, setJspvar, setListdelimiter, setPageContext, setReferid, setVartype, setWrite, setWriter |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TimerTag
public TimerTag()
setName
public void setName(String n)
throws JspTagException
- Throws:
JspTagException
startTimer
public int startTimer(String id,
String id2)
throws 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:
JspTagException
startTimer
public int startTimer(String id)
throws JspTagException
- Throws:
JspTagException
haltTimer
public long haltTimer(int handle)
throws JspTagException
- Stops the timer identified by the handle, and logs and returns the result in second.
- Throws:
JspTagException
doStartTag
public int doStartTag()
throws JspTagException
- Initialize timer.
- Specified by:
doStartTag in interface Tag- Overrides:
doStartTag in class BodyTagSupport
- Throws:
JspTagException
doAfterBody
public int doAfterBody()
throws JspTagException
- Specified by:
doAfterBody in interface IterationTag- Overrides:
doAfterBody in class BodyTagSupport
- Throws:
JspTagException
doEndTag
public int doEndTag()
throws JspTagException
- Specified by:
doEndTag in interface Tag- Overrides:
doEndTag in class ContextReferrerTag
- Throws:
JspTagException
MMBase 2.0-SNAPSHOT - null