Package org.apache.sirona.stopwatches

Examples of org.apache.sirona.stopwatches.StopWatch


    }

    protected Context before(final T invocation, final String name) {
        final ActivationContext context = doFindContext(invocation);

        final StopWatch stopwatch;
        if (context.shouldExecute()) {
            final Counter monitor = Repository.INSTANCE.getCounter(getKey(invocation, name));
            stopwatch = Repository.INSTANCE.start(monitor);
        } else {
            stopwatch = null;
View Full Code Here


     *
     * @see javax.servlet.jsp.tagext.TagSupport#doStartTag()
     */
    @Override
    public int doStartTag() throws JspException {
        StopWatch stopWatch;
        if (scope != null) {
            stopWatch = (StopWatch) pageContext.getAttribute(id, getScope(scope));
        } else {
            stopWatch = (StopWatch) pageContext.getAttribute(id);
        }
        if (stopWatch == null) {
            throw new JspException("No StopWatch under ID " + id + " and scope " + scope);
        }
        stopWatch.stop();
        return EVAL_PAGE;
    }
View Full Code Here

        this.id = id;
    }

    @Override
    public int doStartTag() throws JspException {
        final StopWatch stopWatch = Repository.INSTANCE.start(Repository.INSTANCE.getCounter(new Counter.Key(Role.JSP, name)));
        if (scope != null) {
            pageContext.setAttribute(id, stopWatch, getScope(scope));
        } else {
            pageContext.setAttribute(id, stopWatch);
        }
View Full Code Here

TOP

Related Classes of org.apache.sirona.stopwatches.StopWatch

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.