Package org.shiftone.jrat.util.jmx.dynamic

Examples of org.shiftone.jrat.util.jmx.dynamic.ConfigurableMBean


    this.context = context;
  }

  public synchronized ConfigurableMBean getMBean(String className) {

    ConfigurableMBean attributeMBean = (ConfigurableMBean) classMbeans.get(className);
    if (attributeMBean == null) {
      attributeMBean = new ConfigurableMBean("JRat Statistics for class " + className);
      classMbeans.put(className, attributeMBean);
      context.registerMBean(attributeMBean, "shiftone.jrat.stats:class=" + className);
    }
    return attributeMBean;
  }
View Full Code Here


  }

  public void registerMethodKeyAccumulator(MethodKeyAccumulator accumulator) {

    MethodKey methodKey = accumulator.getMethodKey();
    ConfigurableMBean mBean = getMBean(methodKey.getClassName());
    Signature signature = new Signature(methodKey.getSignature());
    String name = methodKey.getMethodName() + "(" + signature.getShortText() + ")";

    mBean.add(name + ".AverageDuration", new AverageDurationAttributeValue(accumulator));
    mBean.add(name + ".ConcurrentThreads", new ConcurrentThreadsAttributeValue(accumulator));
    mBean.add(name + ".MaxConcurrent", new MaxConcurrentThreadsAttributeValue(accumulator));
    mBean.add(name + ".MaxDuration", new MaxDurationAttributeValue(accumulator));
    mBean.add(name + ".MinDuration", new MinDurationAttributeValue(accumulator));
    mBean.add(name + ".TotalEnters", new TotalEntersAttributeValue(accumulator));
    mBean.add(name + ".TotalExits", new TotalExitsAttributeValue(accumulator));
    mBean.add(name + ".TotalErrors", new TotalErrorsAttributeValue(accumulator));
    mBean.add(name + ".Reset", new ResetAccumulatorOperation(accumulator));
  }
View Full Code Here

TOP

Related Classes of org.shiftone.jrat.util.jmx.dynamic.ConfigurableMBean

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.