Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*-
  * See the file LICENSE for redistribution information.
  *
  * Copyright (c) 2002,2010 Oracle and/or its affiliates.  All rights reserved.
  *
  */
 
 package com.sleepycat.je.jmx.plugin;
 
public class JEStatsPlugin extends StatsPlugin {
    public static String mBeanNamePrefix = 
        "com.sleepycat.je.jmx:name=*JEMonitor(*";
    @Override
    protected void initTabs() {
        if ( == null) {
             = new LinkedHashMap<StringJPanel>();
            try {
                ObjectName name = new ObjectName();
                int count = getContext().getMBeanServerConnection().
                    queryNames(namenull).size();
                if (count > 0) {
                    Stats status =
                        new JEStats(getContext().getMBeanServerConnection());
                    .put("JE Statistics"status);
                    .add(status);
                } else {
                    .put("JE Statistics"new JPanel());
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }
New to GrepCode? Check out our FAQ X