001: /*
002: * Copyright 2003-2005 Sun Microsystems, Inc. All Rights Reserved.
003: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004: *
005: * This code is free software; you can redistribute it and/or modify it
006: * under the terms of the GNU General Public License version 2 only, as
007: * published by the Free Software Foundation. Sun designates this
008: * particular file as subject to the "Classpath" exception as provided
009: * by Sun in the LICENSE file that accompanied this code.
010: *
011: * This code is distributed in the hope that it will be useful, but WITHOUT
012: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
014: * version 2 for more details (a copy is included in the LICENSE file that
015: * accompanied this code).
016: *
017: * You should have received a copy of the GNU General Public License version
018: * 2 along with this work; if not, write to the Free Software Foundation,
019: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020: *
021: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
022: * CA 95054 USA or visit www.sun.com if you need additional information or
023: * have any questions.
024: */
025:
026: package sun.management;
027:
028: import java.util.List;
029: import sun.management.counter.Counter;
030:
031: /**
032: * An interface for the monitoring and management of the
033: * Java virtual machine.
034: */
035: public interface VMManagement {
036:
037: // Optional supports
038: public boolean isCompilationTimeMonitoringSupported();
039:
040: public boolean isThreadContentionMonitoringSupported();
041:
042: public boolean isThreadContentionMonitoringEnabled();
043:
044: public boolean isCurrentThreadCpuTimeSupported();
045:
046: public boolean isOtherThreadCpuTimeSupported();
047:
048: public boolean isThreadCpuTimeEnabled();
049:
050: public boolean isBootClassPathSupported();
051:
052: public boolean isObjectMonitorUsageSupported();
053:
054: public boolean isSynchronizerUsageSupported();
055:
056: // Class Loading Subsystem
057: public long getTotalClassCount();
058:
059: public int getLoadedClassCount();
060:
061: public long getUnloadedClassCount();
062:
063: public boolean getVerboseClass();
064:
065: // Memory Subsystem
066: public boolean getVerboseGC();
067:
068: // Runtime Subsystem
069: public String getManagementVersion();
070:
071: public String getVmId();
072:
073: public String getVmName();
074:
075: public String getVmVendor();
076:
077: public String getVmVersion();
078:
079: public String getVmSpecName();
080:
081: public String getVmSpecVendor();
082:
083: public String getVmSpecVersion();
084:
085: public String getClassPath();
086:
087: public String getLibraryPath();
088:
089: public String getBootClassPath();
090:
091: public List<String> getVmArguments();
092:
093: public long getStartupTime();
094:
095: public int getAvailableProcessors();
096:
097: // Compilation Subsystem
098: public String getCompilerName();
099:
100: public long getTotalCompileTime();
101:
102: // Thread Subsystem
103: public long getTotalThreadCount();
104:
105: public int getLiveThreadCount();
106:
107: public int getPeakThreadCount();
108:
109: public int getDaemonThreadCount();
110:
111: // Operating System
112: public String getOsName();
113:
114: public String getOsArch();
115:
116: public String getOsVersion();
117:
118: // Hotspot-specific Runtime support
119: public long getSafepointCount();
120:
121: public long getTotalSafepointTime();
122:
123: public long getSafepointSyncTime();
124:
125: public long getTotalApplicationNonStoppedTime();
126:
127: public long getLoadedClassSize();
128:
129: public long getUnloadedClassSize();
130:
131: public long getClassLoadingTime();
132:
133: public long getMethodDataSize();
134:
135: public long getInitializedClassCount();
136:
137: public long getClassInitializationTime();
138:
139: public long getClassVerificationTime();
140:
141: // Performance counter support
142: public List<Counter> getInternalCounters(String pattern);
143: }
|