Dashboard Builder Commons 6.1.0.CR1

org.jboss.dashboard.profiler
Class CodeBlockHelper

java.lang.Object
  extended by org.jboss.dashboard.profiler.CodeBlockHelper

public class CodeBlockHelper
extends Object

Helper class for the easy registration of custom code traces.

Usage:

 CodeBlockType traceType = CodeBlockHelper.newCodeBlockType("REPORT", "Report generation");
 CodeBlockTrace trace = CodeBlockHelper.newCodeBlockTrace(traceType, "report1", "Report 1", java.util.Collections.EMPTY_MAP).begin();
 try {
     // Generate the report 1
     // ...
 } finally {
     trace.end();
 }
 


Constructor Summary
CodeBlockHelper()
           
 
Method Summary
static CodeBlockTrace newCodeBlockTrace(CodeBlockType type, String traceId, String traceDescr, Map<String,Object> traceContext)
           
static CodeBlockType newCodeBlockType(String id, String description)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CodeBlockHelper

public CodeBlockHelper()
Method Detail

newCodeBlockType

public static CodeBlockType newCodeBlockType(String id,
                                             String description)

newCodeBlockTrace

public static CodeBlockTrace newCodeBlockTrace(CodeBlockType type,
                                               String traceId,
                                               String traceDescr,
                                               Map<String,Object> traceContext)

Dashboard Builder Commons 6.1.0.CR1

Copyright © 2012-2014 JBoss by Red Hat. All Rights Reserved.