com-sun-tools-visualvm-jvmstat

16:33:54.824 INFO  jd.cli.Main - Decompiling com-sun-tools-visualvm-jvmstat.jar
package com.sun.tools.visualvm.jvmstat;

import com.sun.tools.visualvm.jvmstat.application.JvmstatApplicationProvider;
import com.sun.tools.visualvm.jvmstat.application.PropertiesImpl;
import com.sun.tools.visualvm.tools.jvmstat.JvmJvmstatModelFactory;
import com.sun.tools.visualvm.tools.jvmstat.JvmstatModelFactory;
import org.openide.modules.ModuleInstall;

public class Installer
  extends ModuleInstall
{
  public void restored()
  {
    JvmJvmstatModelFactory factory = JvmJvmstatModelFactory.getDefault();
    
    JvmstatModelFactory.getDefault().registerProvider(new JvmstatModelProvider());
    factory.registerProvider(new JvmJvmstatModelProvider());
    factory.registerProvider(new JRockitJvmJvmstatModelProvider());
    factory.registerProvider(new OracleJRockitJvmJvmstatModelProvider());
    JvmstatApplicationProvider.register();
    PropertiesImpl.initialize();
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.jvmstat.Installer
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.jvmstat;

import com.sun.tools.visualvm.application.Application;
import com.sun.tools.visualvm.tools.jvmstat.JvmJvmstatModel;
import com.sun.tools.visualvm.tools.jvmstat.JvmstatModel;
import com.sun.tools.visualvm.tools.jvmstat.MonitoredValue;

class JRockitJvmJvmstatModel
  extends JvmJvmstatModel
{
  private static final String PERM_GEN_PREFIX = "bea.cls.memory.";
  
  JRockitJvmJvmstatModel(Application app, JvmstatModel stat)
  {
    super(app, stat);
    initMonitoredVales();
  }
  
  private void initMonitoredVales()
  {
    loadedClasses = jvmstat.findMonitoredValueByName("java.cls.loadedClasses");
    sharedLoadedClasses = jvmstat.findMonitoredValueByName("java.cls.sharedLoadedClasses");
    sharedUnloadedClasses = jvmstat.findMonitoredValueByName("java.cls.sharedUnloadedClasses");
    unloadedClasses = jvmstat.findMonitoredValueByName("java.cls.unloadedClasses");
    threadsDaemon = jvmstat.findMonitoredValueByName("java.threads.daemon");
    threadsLive = jvmstat.findMonitoredValueByName("java.threads.live");
    threadsLivePeak = jvmstat.findMonitoredValueByName("java.threads.livePeak");
    threadsStarted = jvmstat.findMonitoredValueByName("java.threads.started");
    applicationTime = jvmstat.findMonitoredValueByName("sun.rt.applicationTime");
    upTime = jvmstat.findMonitoredValueByName("bea.rt.ticks");
    MonitoredValue osFrequencyMon = jvmstat.findMonitoredValueByName("bea.rt.counterFrequency");
    osFrequency = getLongValue(osFrequencyMon);
    genCapacity = jvmstat.findMonitoredValueByPattern("bea.((gc.heap)|(cls.memory)).committed");
    genUsed = jvmstat.findMonitoredValueByPattern("bea.((gc.heap)|(gc.nursery)|(cls.memory)).used");
    genMaxCapacity = getGenerationSum(jvmstat.findMonitoredValueByPattern("bea.((gc.heap)|(cls.memory)).max"));
  }
  
  protected String getPermGenPrefix()
  {
    return "bea.cls.memory.";
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.jvmstat.JRockitJvmJvmstatModel
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.jvmstat;

import com.sun.tools.visualvm.application.Application;
import com.sun.tools.visualvm.tools.jvmstat.JvmJvmstatModel;
import com.sun.tools.visualvm.tools.jvmstat.JvmstatModel;
import com.sun.tools.visualvm.tools.jvmstat.JvmstatModelFactory;

public class JRockitJvmJvmstatModelProvider
  extends JvmJvmstatModelProvider
{
  public JvmJvmstatModel createModelFor(Application app)
  {
    JvmstatModel jvmstat = JvmstatModelFactory.getJvmstatFor(app);
    if (jvmstat != null)
    {
      String vmName = jvmstat.findByName("java.property.java.vm.name");
      if ((vmName != null) && ("BEA JRockit(R)".equals(vmName)))
      {
        JRockitJvmJvmstatModel jvm = null;
        String vmVersion = jvmstat.findByName("java.property.java.vm.version");
        if (vmVersion != null) {
          if (vmVersion.contains("1.6.0")) {
            jvm = new JRockitJvmJvmstatModel(app, jvmstat);
          } else {
            jvm = new JRockitJvmJvmstatModel(app, jvmstat);
          }
        }
        return jvm;
      }
    }
    return null;
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.jvmstat.JRockitJvmJvmstatModelProvider
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.jvmstat;

import com.sun.tools.visualvm.application.Application;
import com.sun.tools.visualvm.core.model.AbstractModelProvider;
import com.sun.tools.visualvm.tools.jvmstat.JvmJvmstatModel;
import com.sun.tools.visualvm.tools.jvmstat.JvmstatModel;
import com.sun.tools.visualvm.tools.jvmstat.JvmstatModelFactory;
import java.util.logging.Level;
import java.util.logging.Logger;

public class JvmJvmstatModelProvider
  extends AbstractModelProvider<JvmJvmstatModel, Application>
{
  private static final Logger LOGGER = Logger.getLogger(JvmJvmstatModelProvider.class.getName());
  
  public JvmJvmstatModel createModelFor(Application app)
  {
    JvmstatModel jvmstat = JvmstatModelFactory.getJvmstatFor(app);
    if (jvmstat != null)
    {
      String vmVersion = jvmstat.findByName("java.property.java.vm.version");
      
      JvmJvmstatModel model = null;
      if (vmVersion.startsWith("1.4.")) {
        model = new JvmJvmstatModel_4(app, jvmstat);
      } else if (vmVersion.startsWith("1.5.")) {
        model = new JvmJvmstatModel_5(app, jvmstat);
      } else if (vmVersion.startsWith("1.6.")) {
        model = new JvmJvmstatModel_5(app, jvmstat);
      } else if (vmVersion.startsWith("1.7.")) {
        model = new JvmJvmstatModel_5(app, jvmstat);
      } else if (vmVersion.startsWith("10.")) {
        model = new JvmJvmstatModel_5(app, jvmstat);
      } else if (vmVersion.startsWith("11.")) {
        model = new JvmJvmstatModel_5(app, jvmstat);
      } else if (vmVersion.startsWith("12.")) {
        model = new JvmJvmstatModel_5(app, jvmstat);
      } else if (vmVersion.startsWith("13.")) {
        model = new JvmJvmstatModel_5(app, jvmstat);
      } else if (vmVersion.startsWith("14.")) {
        model = new JvmJvmstatModel_5(app, jvmstat);
      }
      if (model == null)
      {
        String javaVersion = jvmstat.findByName("java.property.java.version");
        if (javaVersion != null) {
          if (javaVersion.startsWith("1.6.")) {
            model = new JvmJvmstatModel_5(app, jvmstat);
          } else if (javaVersion.startsWith("1.7.")) {
            model = new JvmJvmstatModel_5(app, jvmstat);
          }
        }
        if (model == null)
        {
          LOGGER.log(Level.WARNING, "Unrecognized java.vm.version " + vmVersion);
          model = new JvmJvmstatModel_5(app, jvmstat);
        }
      }
      return model;
    }
    return null;
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.jvmstat.JvmJvmstatModelProvider
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.jvmstat;

import com.sun.tools.visualvm.application.Application;
import com.sun.tools.visualvm.tools.jvmstat.JvmJvmstatModel;
import com.sun.tools.visualvm.tools.jvmstat.JvmstatModel;
import com.sun.tools.visualvm.tools.jvmstat.MonitoredValue;

class JvmJvmstatModel_4
  extends JvmJvmstatModel
{
  private static final String PERM_GEN_PREFIX = "hotspot.gc.generation.2.";
  
  JvmJvmstatModel_4(Application app, JvmstatModel stat)
  {
    super(app, stat);
    initMonitoredVales();
  }
  
  private void initMonitoredVales()
  {
    loadedClasses = jvmstat.findMonitoredValueByName("hotspot.rt.cl.classes.loaded");
    unloadedClasses = jvmstat.findMonitoredValueByName("hotspot.rt.cl.classes.unloaded");
    applicationTime = jvmstat.findMonitoredValueByName("sun.rt.applicationTime");
    upTime = jvmstat.findMonitoredValueByName("hotspot.rt.hrt.ticks");
    MonitoredValue osFrequencyMon = jvmstat.findMonitoredValueByName("hotspot.rt.hrt.frequency");
    osFrequency = getLongValue(osFrequencyMon);
    genCapacity = jvmstat.findMonitoredValueByPattern("hotspot.gc.generation.[0-9]+.capacity.current");
    genUsed = jvmstat.findMonitoredValueByPattern("hotspot.gc.generation.[0-9]+.space.[0-9]+.used");
    genMaxCapacity = getGenerationSum(jvmstat.findMonitoredValueByPattern("hotspot.gc.generation.[0-9]+.capacity.max"));
  }
  
  protected String getPermGenPrefix()
  {
    return "hotspot.gc.generation.2.";
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.jvmstat.JvmJvmstatModel_4
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.jvmstat;

import com.sun.tools.visualvm.application.Application;
import com.sun.tools.visualvm.tools.jvmstat.JvmJvmstatModel;
import com.sun.tools.visualvm.tools.jvmstat.JvmstatModel;
import com.sun.tools.visualvm.tools.jvmstat.MonitoredValue;

class JvmJvmstatModel_5
  extends JvmJvmstatModel
{
  private static final String PERM_GEN_PREFIX = "sun.gc.generation.2.";
  
  JvmJvmstatModel_5(Application app, JvmstatModel stat)
  {
    super(app, stat);
    initMonitoredVales();
  }
  
  private void initMonitoredVales()
  {
    loadedClasses = jvmstat.findMonitoredValueByName("java.cls.loadedClasses");
    sharedLoadedClasses = jvmstat.findMonitoredValueByName("java.cls.sharedLoadedClasses");
    sharedUnloadedClasses = jvmstat.findMonitoredValueByName("java.cls.sharedUnloadedClasses");
    unloadedClasses = jvmstat.findMonitoredValueByName("java.cls.unloadedClasses");
    threadsDaemon = jvmstat.findMonitoredValueByName("java.threads.daemon");
    threadsLive = jvmstat.findMonitoredValueByName("java.threads.live");
    threadsLivePeak = jvmstat.findMonitoredValueByName("java.threads.livePeak");
    threadsStarted = jvmstat.findMonitoredValueByName("java.threads.started");
    applicationTime = jvmstat.findMonitoredValueByName("sun.rt.applicationTime");
    upTime = jvmstat.findMonitoredValueByName("sun.os.hrt.ticks");
    MonitoredValue osFrequencyMon = jvmstat.findMonitoredValueByName("sun.os.hrt.frequency");
    osFrequency = getLongValue(osFrequencyMon);
    genCapacity = jvmstat.findMonitoredValueByPattern("sun.gc.generation.[0-9]+.capacity");
    genUsed = jvmstat.findMonitoredValueByPattern("sun.gc.generation.[0-9]+.space.[0-9]+.used");
    genMaxCapacity = getGenerationSum(jvmstat.findMonitoredValueByPattern("sun.gc.generation.[0-9]+.maxCapacity"));
  }
  
  protected String getPermGenPrefix()
  {
    return "sun.gc.generation.2.";
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.jvmstat.JvmJvmstatModel_5
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.jvmstat;

import sun.jvmstat.monitor.MonitoredVm;

class JvmstatModelImpl$1
  implements Runnable
{
  JvmstatModelImpl$1(JvmstatModelImpl paramJvmstatModelImpl) {}
  
  public void run()
  {
    this$0.disableListeners();
    this$0.monitoredVm.detach();
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.jvmstat.JvmstatModelImpl.1
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.jvmstat;

import com.sun.tools.visualvm.application.Application;
import com.sun.tools.visualvm.core.datasupport.DataRemovedListener;
import com.sun.tools.visualvm.tools.jvmstat.JvmstatListener;
import com.sun.tools.visualvm.tools.jvmstat.JvmstatModel;
import com.sun.tools.visualvm.tools.jvmstat.MonitoredValue;
import java.net.URI;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.openide.ErrorManager;
import org.openide.util.RequestProcessor;
import sun.jvmstat.monitor.Monitor;
import sun.jvmstat.monitor.MonitorException;
import sun.jvmstat.monitor.MonitoredHost;
import sun.jvmstat.monitor.MonitoredVm;
import sun.jvmstat.monitor.VmIdentifier;
import sun.jvmstat.monitor.event.MonitorStatusChangeEvent;
import sun.jvmstat.monitor.event.VmEvent;
import sun.jvmstat.monitor.event.VmListener;

public class JvmstatModelImpl
  extends JvmstatModel
  implements VmListener, DataRemovedListener<Application>
{
  private static final String Variability_CONSTANT = "Constant";
  Application application;
  MonitoredVm monitoredVm;
  Set<JvmstatListener> listeners;
  private Map<String, String> valueCache;
  private Integer pid;
  private MonitoredHost monitoredHost;
  
  JvmstatModelImpl(Application app, MonitoredVm vm)
  {
    application = app;
    pid = Integer.valueOf(vm.getVmIdentifier().getLocalVmId());
    monitoredVm = vm;
    valueCache = new HashMap();
    listeners = new HashSet();
  }
  
  public void addJvmstatListener(JvmstatListener l)
  {
    synchronized (listeners)
    {
      if (listeners.isEmpty()) {
        initListeners();
      }
      listeners.add(l);
    }
  }
  
  public void removeJvmstatListener(JvmstatListener l)
  {
    synchronized (listeners)
    {
      if (!listeners.isEmpty())
      {
        listeners.remove(l);
        if (listeners.isEmpty()) {
          disableListeners();
        }
      }
    }
  }
  
  public String findByName(String name)
  {
    String value = (String)valueCache.get(name);
    if (value != null) {
      return value;
    }
    try
    {
      Monitor mon = monitoredVm.findByName(name);
      if (mon != null)
      {
        value = mon.getValue().toString();
        if (Utils.getVariability(mon).toString().equals("Constant")) {
          valueCache.put(name, value);
        }
      }
      return value;
    }
    catch (MonitorException ex)
    {
      ErrorManager.getDefault().notify(16, ex);
    }
    return null;
  }
  
  public MonitoredValue findMonitoredValueByName(String name)
  {
    try
    {
      Monitor mon = monitoredVm.findByName(name);
      if (mon != null) {
        return new MonitoredValueImpl(mon);
      }
    }
    catch (MonitorException ex)
    {
      ErrorManager.getDefault().notify(16, ex);
    }
    return null;
  }
  
  public List<String> findByPattern(String pattern)
  {
    try
    {
      List<Monitor> monitorList = monitoredVm.findByPattern(pattern);
      List<String> monitorStrList = new ArrayList(monitorList.size());
      for (Monitor monitor : monitorList) {
        monitorStrList.add(monitor.getValue().toString());
      }
      return monitorStrList;
    }
    catch (MonitorException ex)
    {
      ErrorManager.getDefault().notify(16, ex);
    }
    return null;
  }
  
  public List<MonitoredValue> findMonitoredValueByPattern(String pattern)
  {
    try
    {
      List<Monitor> monitorList = monitoredVm.findByPattern(pattern);
      List<MonitoredValue> monitoredValueList = new ArrayList(monitorList.size());
      for (Monitor monitor : monitorList) {
        monitoredValueList.add(new MonitoredValueImpl(monitor));
      }
      return monitoredValueList;
    }
    catch (MonitorException ex)
    {
      ErrorManager.getDefault().notify(16, ex);
    }
    return null;
  }
  
  void initListeners()
  {
    try
    {
      monitoredHost = MonitoredHost.getMonitoredHost(monitoredVm.getVmIdentifier());
      monitoredVm.addVmListener(this);
    }
    catch (MonitorException ex)
    {
      ErrorManager.getDefault().notify(16, ex);
    }
  }
  
  void disableListeners()
  {
    try
    {
      monitoredVm.removeVmListener(this);
    }
    catch (MonitorException ex)
    {
      ErrorManager.getDefault().notify(16, ex);
    }
    monitoredHost = null;
  }
  
  public void monitorStatusChanged(MonitorStatusChangeEvent event) {}
  
  public void monitorsUpdated(VmEvent event)
  {
    assert (event.getMonitoredVm().equals(monitoredVm));
    try
    {
      if (monitoredHost.activeVms().contains(pid))
      {
        List<JvmstatListener> listenersCopy;
        synchronized (listeners)
        {
          listenersCopy = new ArrayList(listeners);
        }
        for (JvmstatListener listener : listenersCopy) {
          listener.dataChanged(this);
        }
      }
      else
      {
        disableListeners();
        monitoredVm.detach();
      }
    }
    catch (MonitorException ex)
    {
      ErrorManager.getDefault().notify(16, ex);
      disableListeners();
      monitoredVm.detach();
    }
  }
  
  public void disconnected(VmEvent event)
  {
    ErrorManager.getDefault().log("Disconnect " + event.getMonitoredVm().getVmIdentifier());
    disableListeners();
    monitoredVm.detach();
  }
  
  public void dataRemoved(Application dataSource)
  {
    RequestProcessor.getDefault().post(new Runnable()
    {
      public void run()
      {
        disableListeners();
        monitoredVm.detach();
      }
    });
  }
  
  public String getConnectionId()
  {
    return monitoredVm.getVmIdentifier().getURI().toString();
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.jvmstat.JvmstatModelImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.jvmstat;

import com.sun.tools.visualvm.application.Application;
import com.sun.tools.visualvm.core.model.AbstractModelProvider;
import com.sun.tools.visualvm.core.options.GlobalPreferences;
import com.sun.tools.visualvm.jvmstat.application.JvmstatApplicationProvider;
import com.sun.tools.visualvm.tools.jvmstat.JvmstatModel;
import java.net.URISyntaxException;
import java.util.logging.Level;
import java.util.logging.Logger;
import sun.jvmstat.monitor.MonitorException;
import sun.jvmstat.monitor.MonitoredHost;
import sun.jvmstat.monitor.MonitoredVm;
import sun.jvmstat.monitor.VmIdentifier;

public class JvmstatModelProvider
  extends AbstractModelProvider<JvmstatModel, Application>
{
  private static final Logger LOGGER = Logger.getLogger(JvmstatModelProvider.class.getName());
  
  static MonitoredVm getMonitoredVm(Application app)
    throws MonitorException
  {
    if ((app.isRemoved()) || (app.getPid() == -1)) {
      return null;
    }
    String vmId = "//" + app.getPid();
    try
    {
      MonitoredHost monitoredHost = JvmstatApplicationProvider.findMonitoredHost(app);
      if (monitoredHost != null)
      {
        int refreshInterval = GlobalPreferences.sharedInstance().getMonitoredDataPoll() * 1000;
        return monitoredHost.getMonitoredVm(new VmIdentifier(vmId), refreshInterval);
      }
    }
    catch (URISyntaxException ex)
    {
      LOGGER.log(Level.WARNING, ex.getLocalizedMessage(), ex);
    }
    catch (Exception ex)
    {
      LOGGER.log(Level.INFO, "getMonitoredVm failed", ex);
    }
    return null;
  }
  
  public JvmstatModel createModelFor(Application app)
  {
    MonitoredVm vm = null;
    try
    {
      vm = getMonitoredVm(app);
      if (vm != null)
      {
        if (vm.findByName("java.property.java.vm.version") != null)
        {
          JvmstatModelImpl jvmstat = new JvmstatModelImpl(app, vm);
          app.notifyWhenRemoved(jvmstat);
          return jvmstat;
        }
        LOGGER.log(Level.INFO, "java.property.java.vm.version is null");
      }
    }
    catch (MonitorException ex)
    {
      LOGGER.log(Level.INFO, "Could not get MonitoredVM", ex);
    }
    if (vm != null) {
      vm.detach();
    }
    return null;
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.jvmstat.JvmstatModelProvider
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.jvmstat;

import com.sun.tools.visualvm.tools.jvmstat.MonitoredValue;
import sun.jvmstat.monitor.Monitor;

public class MonitoredValueImpl
  extends MonitoredValue
{
  private Monitor monitor;
  
  MonitoredValueImpl(Monitor mon)
  {
    monitor = mon;
  }
  
  public String getName()
  {
    return monitor.getName();
  }
  
  public Object getValue()
  {
    return monitor.getValue();
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.jvmstat.MonitoredValueImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.jvmstat;

import com.sun.tools.visualvm.application.Application;
import com.sun.tools.visualvm.tools.jvmstat.JvmJvmstatModel;
import com.sun.tools.visualvm.tools.jvmstat.JvmstatModel;
import com.sun.tools.visualvm.tools.jvmstat.MonitoredValue;

class OracleJRockitJvmJvmstatModel
  extends JvmJvmstatModel
{
  private static final String PERM_GEN_PREFIX = "oracle.cls.memory.";
  
  OracleJRockitJvmJvmstatModel(Application app, JvmstatModel stat)
  {
    super(app, stat);
    initMonitoredVales();
  }
  
  private void initMonitoredVales()
  {
    loadedClasses = jvmstat.findMonitoredValueByName("java.cls.loadedClasses");
    sharedLoadedClasses = jvmstat.findMonitoredValueByName("java.cls.sharedLoadedClasses");
    sharedUnloadedClasses = jvmstat.findMonitoredValueByName("java.cls.sharedUnloadedClasses");
    unloadedClasses = jvmstat.findMonitoredValueByName("java.cls.unloadedClasses");
    threadsDaemon = jvmstat.findMonitoredValueByName("java.threads.daemon");
    threadsLive = jvmstat.findMonitoredValueByName("java.threads.live");
    threadsLivePeak = jvmstat.findMonitoredValueByName("java.threads.livePeak");
    threadsStarted = jvmstat.findMonitoredValueByName("java.threads.started");
    applicationTime = jvmstat.findMonitoredValueByName("sun.rt.applicationTime");
    upTime = jvmstat.findMonitoredValueByName("oracle.rt.ticks");
    MonitoredValue osFrequencyMon = jvmstat.findMonitoredValueByName("oracle.rt.counterFrequency");
    osFrequency = getLongValue(osFrequencyMon);
    genCapacity = jvmstat.findMonitoredValueByPattern("((jrockit.gc.pool.heap)|(oracle.cls.memory)).committed");
    genUsed = jvmstat.findMonitoredValueByPattern("((jrockit.gc.pool.heap)|(jrockit.gc.pool.nursery)|(oracle.cls.memory)).used");
    genMaxCapacity = getGenerationSum(jvmstat.findMonitoredValueByPattern("((jrockit.gc.pool.heap)|(oracle.cls.memory)).max"));
  }
  
  protected String getPermGenPrefix()
  {
    return "oracle.cls.memory.";
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.jvmstat.OracleJRockitJvmJvmstatModel
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.jvmstat;

import com.sun.tools.visualvm.application.Application;
import com.sun.tools.visualvm.tools.jvmstat.JvmJvmstatModel;
import com.sun.tools.visualvm.tools.jvmstat.JvmstatModel;
import com.sun.tools.visualvm.tools.jvmstat.JvmstatModelFactory;

public class OracleJRockitJvmJvmstatModelProvider
  extends JvmJvmstatModelProvider
{
  public JvmJvmstatModel createModelFor(Application app)
  {
    JvmstatModel jvmstat = JvmstatModelFactory.getJvmstatFor(app);
    if (jvmstat != null)
    {
      String vmName = jvmstat.findByName("java.property.java.vm.name");
      if ((vmName != null) && ("Oracle JRockit(R)".equals(vmName)))
      {
        JvmJvmstatModel jvm = null;
        String vmVersion = jvmstat.findByName("java.property.java.vm.version");
        if (vmVersion != null) {
          if (vmVersion.contains("1.6.0")) {
            jvm = new OracleJRockitJvmJvmstatModel(app, jvmstat);
          } else {
            jvm = new OracleJRockitJvmJvmstatModel(app, jvmstat);
          }
        }
        return jvm;
      }
    }
    return null;
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.jvmstat.OracleJRockitJvmJvmstatModelProvider
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.jvmstat;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import sun.jvmstat.monitor.Monitor;

class Utils
{
  private static Method getVariabilityMethod = getMonitorMethod("getVariability");
  private static Method getUnitsMethod = getMonitorMethod("getUnits");
  
  static Object getVariability(Monitor monitor)
  {
    return invokeGetter(monitor, getVariabilityMethod);
  }
  
  static Object getUnits(Monitor monitor)
  {
    return invokeGetter(monitor, getUnitsMethod);
  }
  
  private static Object invokeGetter(Monitor monitor, Method method)
  {
    try
    {
      return method.invoke(monitor, new Object[0]);
    }
    catch (IllegalArgumentException ex)
    {
      throw new RuntimeException(ex);
    }
    catch (InvocationTargetException ex)
    {
      throw new RuntimeException(ex);
    }
    catch (IllegalAccessException ex)
    {
      throw new RuntimeException(ex);
    }
  }
  
  private static Method getMonitorMethod(String methodName)
  {
    try
    {
      return Monitor.class.getDeclaredMethod(methodName, new Class[0]);
    }
    catch (SecurityException ex)
    {
      throw new RuntimeException(ex);
    }
    catch (NoSuchMethodException ex)
    {
      throw new RuntimeException(ex);
    }
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.jvmstat.Utils
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.jvmstat.application;

import com.sun.tools.visualvm.core.properties.PropertiesSupport;
import com.sun.tools.visualvm.core.ui.actions.SingleDataSourceAction;
import com.sun.tools.visualvm.host.Host;
import java.awt.event.ActionEvent;
import org.openide.util.NbBundle;

class AddJstatdConnectionAction
  extends SingleDataSourceAction<Host>
{
  private static AddJstatdConnectionAction instance;
  
  public static synchronized AddJstatdConnectionAction instance()
  {
    if (instance == null) {
      instance = new AddJstatdConnectionAction();
    }
    return instance;
  }
  
  protected void actionPerformed(Host host, ActionEvent actionEvent)
  {
    PropertiesSupport.sharedInstance().openProperties(host, 100);
  }
  
  protected boolean isEnabled(Host host)
  {
    return true;
  }
  
  private AddJstatdConnectionAction()
  {
    super(Host.class);
    putValue("Name", NbBundle.getMessage(AddJstatdConnectionAction.class, "ACT_AddJstatdConnection"));
    
    putValue("ShortDescription", NbBundle.getMessage(AddJstatdConnectionAction.class, "DESCR_AddJstatdConnection"));
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.jvmstat.application.AddJstatdConnectionAction
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.jvmstat.application;

import com.sun.tools.visualvm.core.options.GlobalPreferences;
import com.sun.tools.visualvm.host.Host;
import java.net.URISyntaxException;
import org.openide.util.Exceptions;
import sun.jvmstat.monitor.HostIdentifier;

class ConnectionDescriptor
{
  static final ConnectionDescriptor DEFAULT_LOCAL_DESCRIPTOR = new ConnectionDescriptor(-1, GlobalPreferences.sharedInstance().getMonitoredHostPoll());
  private int port;
  private double refreshRate;
  
  ConnectionDescriptor(int port, double refreshRate)
  {
    setPort(port);
    setRefreshRate(refreshRate);
  }
  
  static ConnectionDescriptor createDefault()
  {
    return new ConnectionDescriptor(1099, GlobalPreferences.sharedInstance().getMonitoredHostPoll());
  }
  
  final void setPort(int port)
  {
    this.port = port;
  }
  
  final int getPort()
  {
    return port;
  }
  
  final void setRefreshRate(double refreshRate)
  {
    this.refreshRate = refreshRate;
  }
  
  final double getRefreshRate()
  {
    return refreshRate;
  }
  
  final HostIdentifier createHostIdentifier(Host host)
  {
    String hostId = null;
    if (this != DEFAULT_LOCAL_DESCRIPTOR)
    {
      hostId = "rmi://" + host.getHostName();
      if (port != 1099) {
        hostId = hostId + ":" + port;
      }
    }
    try
    {
      return new HostIdentifier(hostId);
    }
    catch (URISyntaxException e)
    {
      Exceptions.printStackTrace(e);
    }
    return null;
  }
  
  public boolean equals(Object o)
  {
    if (!(o instanceof ConnectionDescriptor)) {
      return false;
    }
    return port == port;
  }
  
  public int hashCode()
  {
    return port;
  }
  
  public String toString()
  {
    return "Port: " + port + ", Refresh Rate: " + refreshRate;
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.jvmstat.application.ConnectionDescriptor
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.jvmstat.application;

import javax.swing.ListSelectionModel;
import javax.swing.table.DefaultTableModel;

class ConnectionsCustomizer$1
  implements Runnable
{
  ConnectionsCustomizer$1(ConnectionsCustomizer paramConnectionsCustomizer) {}
  
  public void run()
  {
    if (ConnectionsCustomizer.access$000(this$0).getRowCount() > 0) {
      ConnectionsCustomizer.access$100(this$0).getSelectionModel().setSelectionInterval(0, 0);
    }
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.jvmstat.application.ConnectionsCustomizer.1
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.jvmstat.application;

import java.awt.CardLayout;
import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.table.DefaultTableModel;

class ConnectionsCustomizer$2
  implements Runnable
{
  ConnectionsCustomizer$2(ConnectionsCustomizer paramConnectionsCustomizer) {}
  
  public void run()
  {
    CardLayout cl = (CardLayout)ConnectionsCustomizer.access$200(this$0).getLayout();
    cl.show(ConnectionsCustomizer.access$200(this$0), ConnectionsCustomizer.access$000(this$0).getRowCount() > 0 ? "DATA_VIEW" : "NO_DATA_VIEW");
    ConnectionsCustomizer.access$500(this$0).setEnabled(!ConnectionsCustomizer.access$400(this$0, ConnectionsCustomizer.access$300()));
    ConnectionsCustomizer.access$600(this$0).setEnabled(ConnectionsCustomizer.access$100(this$0).getSelectedRow() != -1);
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.jvmstat.application.ConnectionsCustomizer.2
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.jvmstat.application;

class ConnectionsCustomizer$3
  implements Runnable
{
  ConnectionsCustomizer$3(ConnectionsCustomizer paramConnectionsCustomizer) {}
  
  public void run()
  {
    ConnectionsCustomizer.access$700(this$0);
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.jvmstat.application.ConnectionsCustomizer.3
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.jvmstat.application;

import java.awt.Dimension;
import javax.swing.table.TableCellEditor;
import javax.swing.table.TableCellRenderer;
import javax.swing.table.TableModel;

class ConnectionsCustomizer$4
  extends ConnectionsTable
{
  ConnectionsCustomizer$4(ConnectionsCustomizer paramConnectionsCustomizer, TableModel x0, TableCellRenderer x1, TableCellEditor x2)
  {
    super(x0, x1, x2);
  }
  
  public int getRowHeight()
  {
    return ConnectionsCustomizer.access$800();
  }
  
  public Dimension getPreferredSize()
  {
    Dimension ps = super.getPreferredSize();
    width = ConnectionsCustomizer.access$900();
    return ps;
  }
  
  public Dimension getMinimumSize()
  {
    Dimension ms = super.getMinimumSize();
    width = ConnectionsCustomizer.access$900();
    return ms;
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.jvmstat.application.ConnectionsCustomizer.4
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.jvmstat.application;

import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;

class ConnectionsCustomizer$5
  implements ListSelectionListener
{
  ConnectionsCustomizer$5(ConnectionsCustomizer paramConnectionsCustomizer) {}
  
  public void valueChanged(ListSelectionEvent e)
  {
    ConnectionsCustomizer.access$700(this$0);
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.jvmstat.application.ConnectionsCustomizer.5
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.jvmstat.application;

import java.awt.event.ActionEvent;
import javax.swing.JButton;

class ConnectionsCustomizer$6
  extends JButton
{
  ConnectionsCustomizer$6(ConnectionsCustomizer paramConnectionsCustomizer) {}
  
  protected void fireActionPerformed(ActionEvent e)
  {
    ConnectionsCustomizer.access$1000(this$0);
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.jvmstat.application.ConnectionsCustomizer.6
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.jvmstat.application;

import java.awt.event.ActionEvent;
import javax.swing.JButton;

class ConnectionsCustomizer$7
  extends JButton
{
  ConnectionsCustomizer$7(ConnectionsCustomizer paramConnectionsCustomizer) {}
  
  protected void fireActionPerformed(ActionEvent e)
  {
    ConnectionsCustomizer.access$1100(this$0);
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.jvmstat.application.ConnectionsCustomizer.7
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.jvmstat.application;

import java.awt.event.ActionEvent;
import javax.swing.JButton;

class ConnectionsCustomizer$8
  extends JButton
{
  ConnectionsCustomizer$8(ConnectionsCustomizer paramConnectionsCustomizer) {}
  
  protected void fireActionPerformed(ActionEvent e)
  {
    ConnectionsCustomizer.access$1200(this$0);
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.jvmstat.application.ConnectionsCustomizer.8
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.jvmstat.application;

class ConnectionsCustomizer$CellEditor$1$1
  implements Runnable
{
  ConnectionsCustomizer$CellEditor$1$1(ConnectionsCustomizer.CellEditor.1 param1) {}
  
  public void run()
  {
    ConnectionsCustomizer.CellEditor.access$1400(this$1.this$0);
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.jvmstat.application.ConnectionsCustomizer.CellEditor.1.1
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.jvmstat.application;

import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import javax.swing.SwingUtilities;

class ConnectionsCustomizer$CellEditor$1
  implements PropertyChangeListener
{
  ConnectionsCustomizer$CellEditor$1(ConnectionsCustomizer.CellEditor paramCellEditor) {}
  
  public void propertyChange(PropertyChangeEvent evt)
  {
    SwingUtilities.invokeLater(new Runnable()
    {
      public void run()
      {
        ConnectionsCustomizer.CellEditor.access$1400(this$0);
      }
    });
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.jvmstat.application.ConnectionsCustomizer.CellEditor.1
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.jvmstat.application;

import javax.swing.JFormattedTextField;
import javax.swing.JFormattedTextField.AbstractFormatter;

class ConnectionsCustomizer$CellEditor$2$1
  implements Runnable
{
  ConnectionsCustomizer$CellEditor$2$1(ConnectionsCustomizer.CellEditor.2 param2) {}
  
  public void run()
  {
    try
    {
      int val = ((Integer)this$1.val$tf.getFormatter().stringToValue(this$1.val$tf.getText().trim())).intValue();
      if (ConnectionsCustomizer.CellEditor.access$1600(this$1.this$0) != null)
      {
        ConnectionsCustomizer.CellEditor.access$1600(this$1.this$0).setPort(val);
        ConnectionsCustomizer.CellEditor.access$1700(this$1.this$0).run();
      }
    }
    catch (Exception ex) {}
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.jvmstat.application.ConnectionsCustomizer.CellEditor.2.1
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.jvmstat.application;

import javax.swing.JFormattedTextField;
import javax.swing.JFormattedTextField.AbstractFormatter;
import javax.swing.SwingUtilities;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;

class ConnectionsCustomizer$CellEditor$2
  implements DocumentListener
{
  ConnectionsCustomizer$CellEditor$2(ConnectionsCustomizer.CellEditor paramCellEditor, JFormattedTextField paramJFormattedTextField) {}
  
  public void insertUpdate(DocumentEvent e)
  {
    commitEdit();
  }
  
  public void removeUpdate(DocumentEvent e)
  {
    commitEdit();
  }
  
  public void changedUpdate(DocumentEvent e)
  {
    commitEdit();
  }
  
  private void commitEdit()
  {
    SwingUtilities.invokeLater(new Runnable()
    {
      public void run()
      {
        try
        {
          int val = ((Integer)val$tf.getFormatter().stringToValue(val$tf.getText().trim())).intValue();
          if (ConnectionsCustomizer.CellEditor.access$1600(this$0) != null)
          {
            ConnectionsCustomizer.CellEditor.access$1600(this$0).setPort(val);
            ConnectionsCustomizer.CellEditor.access$1700(this$0).run();
          }
        }
        catch (Exception ex) {}
      }
    });
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.jvmstat.application.ConnectionsCustomizer.CellEditor.2
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.jvmstat.application;

import javax.swing.JSpinner;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;

class ConnectionsCustomizer$CellEditor$3
  implements ChangeListener
{
  ConnectionsCustomizer$CellEditor$3(ConnectionsCustomizer.CellEditor paramCellEditor) {}
  
  public void stateChanged(ChangeEvent e)
  {
    if (ConnectionsCustomizer.CellEditor.access$1600(this$0) != null) {
      ConnectionsCustomizer.CellEditor.access$1600(this$0).setPort(((Integer)ConnectionsCustomizer.CellEditor.access$1800(this$0).getValue()).intValue());
    }
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.jvmstat.application.ConnectionsCustomizer.CellEditor.3
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.jvmstat.application;

import javax.swing.JFormattedTextField;
import javax.swing.JFormattedTextField.AbstractFormatter;

class ConnectionsCustomizer$CellEditor$4$1
  implements Runnable
{
  ConnectionsCustomizer$CellEditor$4$1(ConnectionsCustomizer.CellEditor.4 param4) {}
  
  public void run()
  {
    try
    {
      int val = ((Integer)this$1.val$tf.getFormatter().stringToValue(this$1.val$tf.getText().trim())).intValue();
      if (ConnectionsCustomizer.CellEditor.access$1600(this$1.this$0) != null) {
        ConnectionsCustomizer.CellEditor.access$1600(this$1.this$0).setRefreshRate(val);
      }
    }
    catch (Exception ex) {}
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.jvmstat.application.ConnectionsCustomizer.CellEditor.4.1
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.jvmstat.application;

import javax.swing.JFormattedTextField;
import javax.swing.JFormattedTextField.AbstractFormatter;
import javax.swing.SwingUtilities;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;

class ConnectionsCustomizer$CellEditor$4
  implements DocumentListener
{
  ConnectionsCustomizer$CellEditor$4(ConnectionsCustomizer.CellEditor paramCellEditor, JFormattedTextField paramJFormattedTextField) {}
  
  public void insertUpdate(DocumentEvent e)
  {
    commitEdit();
  }
  
  public void removeUpdate(DocumentEvent e)
  {
    commitEdit();
  }
  
  public void changedUpdate(DocumentEvent e)
  {
    commitEdit();
  }
  
  private void commitEdit()
  {
    SwingUtilities.invokeLater(new Runnable()
    {
      public void run()
      {
        try
        {
          int val = ((Integer)val$tf.getFormatter().stringToValue(val$tf.getText().trim())).intValue();
          if (ConnectionsCustomizer.CellEditor.access$1600(this$0) != null) {
            ConnectionsCustomizer.CellEditor.access$1600(this$0).setRefreshRate(val);
          }
        }
        catch (Exception ex) {}
      }
    });
  }
}

/* Location:
 * Qualified Name:     com.sun.tools.visualvm.jvmstat.application.ConnectionsCustomizer.CellEditor.4
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.tools.visualvm.jvmstat.application;

import javax.swing.JSpinner;
import javax.swing.event.ChangeEvent;
import java
1 2 3 4

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd