jdk/src/share/classes/sun/management/snmp/jvmmib/JVM_MANAGEMENT_MIB.java
author mchung
Tue, 17 Jan 2012 15:55:40 -0800
changeset 11530 a9d059c15b80
parent 5506 202f599c92aa
child 14342 8435a30053c1
permissions -rw-r--r--
7117570: Warnings in sun.mangement.* and its subpackages Reviewed-by: mchung, dsamersoff Contributed-by: kurchi.subhra.hazra@oracle.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     2
 * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package sun.management.snmp.jvmmib;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
//
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
//
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
// java imports
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
//
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
import java.io.Serializable;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
import java.util.Hashtable;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
// jmx imports
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
//
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
import javax.management.MBeanServer;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
import javax.management.ObjectName;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
import javax.management.InstanceAlreadyExistsException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
// jdmk imports
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
//
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
import com.sun.jmx.snmp.agent.SnmpMib;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
import com.sun.jmx.snmp.agent.SnmpMibNode;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
import com.sun.jmx.snmp.agent.SnmpMibTable;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
 * The class is used for representing "JVM-MANAGEMENT-MIB".
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
 * You can edit the file if you want to modify the behaviour of the MIB.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
public abstract class JVM_MANAGEMENT_MIB extends SnmpMib implements Serializable {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
11530
a9d059c15b80 7117570: Warnings in sun.mangement.* and its subpackages
mchung
parents: 5506
diff changeset
    56
    static final long serialVersionUID = 6895037919735816732L;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
     * Default constructor. Initialize the Mib tree.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
    public JVM_MANAGEMENT_MIB() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
        mibName = "JVM_MANAGEMENT_MIB";
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
     * Initialization of the MIB with no registration in Java DMK.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
    public void init() throws IllegalAccessException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
        // Allow only one initialization of the MIB.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
        //
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
        if (isInitialized == true) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
            return ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
        try  {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
            populate(null, null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
        } catch(IllegalAccessException x)  {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
            throw x;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
        } catch(RuntimeException x)  {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
            throw x;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
        } catch(Exception x)  {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
            throw new Error(x.getMessage());
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
        isInitialized = true;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
     * Initialization of the MIB with AUTOMATIC REGISTRATION in Java DMK.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
    public ObjectName preRegister(MBeanServer server, ObjectName name)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
            throws Exception {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
        // Allow only one initialization of the MIB.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
        //
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
        if (isInitialized == true) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
            throw new InstanceAlreadyExistsException();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
        // Initialize MBeanServer information.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
        //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
        this.server = server;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
        populate(server, name);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
        isInitialized = true;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
        return name;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
     * Initialization of the MIB with no registration in Java DMK.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
    public void populate(MBeanServer server, ObjectName name)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
        throws Exception {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
        // Allow only one initialization of the MIB.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
        //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
        if (isInitialized == true) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
            return ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
        if (objectserver == null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
            objectserver = new SnmpStandardObjectServer();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
        // Initialization of the "JvmOS" group.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
        // To disable support of this group, redefine the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
        // "createJvmOSMetaNode()" factory method, and make it return "null"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
        //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
        initJvmOS(server);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
        // Initialization of the "JvmCompilation" group.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
        // To disable support of this group, redefine the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
        // "createJvmCompilationMetaNode()" factory method, and make it return "null"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
        //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
        initJvmCompilation(server);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
        // Initialization of the "JvmRuntime" group.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
        // To disable support of this group, redefine the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
        // "createJvmRuntimeMetaNode()" factory method, and make it return "null"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
        //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
        initJvmRuntime(server);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
        // Initialization of the "JvmThreading" group.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
        // To disable support of this group, redefine the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
        // "createJvmThreadingMetaNode()" factory method, and make it return "null"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
        //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
        initJvmThreading(server);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
        // Initialization of the "JvmMemory" group.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
        // To disable support of this group, redefine the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
        // "createJvmMemoryMetaNode()" factory method, and make it return "null"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
        //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
        initJvmMemory(server);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
        // Initialization of the "JvmClassLoading" group.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
        // To disable support of this group, redefine the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
        // "createJvmClassLoadingMetaNode()" factory method, and make it return "null"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
        //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
        initJvmClassLoading(server);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
        isInitialized = true;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
    // ------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
    // Initialization of the "JvmOS" group.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
    // ------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
     * Initialization of the "JvmOS" group.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
     * To disable support of this group, redefine the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
     * "createJvmOSMetaNode()" factory method, and make it return "null"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
     * @param server    MBeanServer for this group (may be null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
     **/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
    protected void initJvmOS(MBeanServer server)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
        throws Exception {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
        final String oid = getGroupOid("JvmOS", "1.3.6.1.4.1.42.2.145.3.163.1.1.6");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
        ObjectName objname = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
        if (server != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
            objname = getGroupObjectName("JvmOS", oid, mibName + ":name=sun.management.snmp.jvmmib.JvmOS");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
        final JvmOSMeta meta = createJvmOSMetaNode("JvmOS", oid, objname, server);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
        if (meta != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
            meta.registerTableNodes( this, server );
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
            // Note that when using standard metadata,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
            // the returned object must implement the "JvmOSMBean"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
            // interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
            //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
            final JvmOSMBean group = (JvmOSMBean) createJvmOSMBean("JvmOS", oid, objname, server);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
            meta.setInstance( group );
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
            registerGroupNode("JvmOS", oid, objname, meta, group, server);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
     * Factory method for "JvmOS" group metadata class.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
     * You can redefine this method if you need to replace the default
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
     * generated metadata class with your own customized class.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
     * @param groupName Name of the group ("JvmOS")
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
     * @param groupOid  OID of this group
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
     * @param groupObjname ObjectName for this group (may be null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
     * @param server    MBeanServer for this group (may be null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
     * @return An instance of the metadata class generated for the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
     *         "JvmOS" group (JvmOSMeta)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
     **/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
    protected JvmOSMeta createJvmOSMetaNode(String groupName,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
                String groupOid, ObjectName groupObjname, MBeanServer server)  {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
        return new JvmOSMeta(this, objectserver);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
     * Factory method for "JvmOS" group MBean.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
     * You can redefine this method if you need to replace the default
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
     * generated MBean class with your own customized class.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
     * @param groupName Name of the group ("JvmOS")
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
     * @param groupOid  OID of this group
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
     * @param groupObjname ObjectName for this group (may be null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
     * @param server    MBeanServer for this group (may be null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
     * @return An instance of the MBean class generated for the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
     *         "JvmOS" group (JvmOS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
     * Note that when using standard metadata,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
     * the returned object must implement the "JvmOSMBean"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
     * interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
     **/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
    protected abstract Object createJvmOSMBean(String groupName,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
                String groupOid,  ObjectName groupObjname, MBeanServer server);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
    // ------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
    // Initialization of the "JvmCompilation" group.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
    // ------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
     * Initialization of the "JvmCompilation" group.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
     * To disable support of this group, redefine the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
     * "createJvmCompilationMetaNode()" factory method, and make it return "null"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
     * @param server    MBeanServer for this group (may be null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
     **/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
    protected void initJvmCompilation(MBeanServer server)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
        throws Exception {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
        final String oid = getGroupOid("JvmCompilation", "1.3.6.1.4.1.42.2.145.3.163.1.1.5");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
        ObjectName objname = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
        if (server != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
            objname = getGroupObjectName("JvmCompilation", oid, mibName + ":name=sun.management.snmp.jvmmib.JvmCompilation");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
        final JvmCompilationMeta meta = createJvmCompilationMetaNode("JvmCompilation", oid, objname, server);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
        if (meta != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
            meta.registerTableNodes( this, server );
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
            // Note that when using standard metadata,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
            // the returned object must implement the "JvmCompilationMBean"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
            // interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
            //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
            final JvmCompilationMBean group = (JvmCompilationMBean) createJvmCompilationMBean("JvmCompilation", oid, objname, server);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
            meta.setInstance( group );
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
            registerGroupNode("JvmCompilation", oid, objname, meta, group, server);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
     * Factory method for "JvmCompilation" group metadata class.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
     * You can redefine this method if you need to replace the default
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
     * generated metadata class with your own customized class.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
     * @param groupName Name of the group ("JvmCompilation")
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
     * @param groupOid  OID of this group
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
     * @param groupObjname ObjectName for this group (may be null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
     * @param server    MBeanServer for this group (may be null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
     * @return An instance of the metadata class generated for the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
     *         "JvmCompilation" group (JvmCompilationMeta)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
     **/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
    protected JvmCompilationMeta createJvmCompilationMetaNode(String groupName,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
                String groupOid, ObjectName groupObjname, MBeanServer server)  {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
        return new JvmCompilationMeta(this, objectserver);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
     * Factory method for "JvmCompilation" group MBean.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
     * You can redefine this method if you need to replace the default
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
     * generated MBean class with your own customized class.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
     * @param groupName Name of the group ("JvmCompilation")
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
     * @param groupOid  OID of this group
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
     * @param groupObjname ObjectName for this group (may be null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
     * @param server    MBeanServer for this group (may be null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
     * @return An instance of the MBean class generated for the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
     *         "JvmCompilation" group (JvmCompilation)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
     * Note that when using standard metadata,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
     * the returned object must implement the "JvmCompilationMBean"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
     * interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
     **/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
    protected abstract Object createJvmCompilationMBean(String groupName,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
                String groupOid,  ObjectName groupObjname, MBeanServer server);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
    // ------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
    // Initialization of the "JvmRuntime" group.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
    // ------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
     * Initialization of the "JvmRuntime" group.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
     * To disable support of this group, redefine the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
     * "createJvmRuntimeMetaNode()" factory method, and make it return "null"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
     * @param server    MBeanServer for this group (may be null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
     **/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
    protected void initJvmRuntime(MBeanServer server)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
        throws Exception {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
        final String oid = getGroupOid("JvmRuntime", "1.3.6.1.4.1.42.2.145.3.163.1.1.4");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
        ObjectName objname = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
        if (server != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
            objname = getGroupObjectName("JvmRuntime", oid, mibName + ":name=sun.management.snmp.jvmmib.JvmRuntime");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
        final JvmRuntimeMeta meta = createJvmRuntimeMetaNode("JvmRuntime", oid, objname, server);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
        if (meta != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
            meta.registerTableNodes( this, server );
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
90ce3da70b43 Initial load
duke
parents:
diff changeset
   351
            // Note that when using standard metadata,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   352
            // the returned object must implement the "JvmRuntimeMBean"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   353
            // interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   354
            //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   355
            final JvmRuntimeMBean group = (JvmRuntimeMBean) createJvmRuntimeMBean("JvmRuntime", oid, objname, server);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
            meta.setInstance( group );
90ce3da70b43 Initial load
duke
parents:
diff changeset
   357
            registerGroupNode("JvmRuntime", oid, objname, meta, group, server);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   358
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   359
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
90ce3da70b43 Initial load
duke
parents:
diff changeset
   361
90ce3da70b43 Initial load
duke
parents:
diff changeset
   362
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   363
     * Factory method for "JvmRuntime" group metadata class.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   364
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   365
     * You can redefine this method if you need to replace the default
90ce3da70b43 Initial load
duke
parents:
diff changeset
   366
     * generated metadata class with your own customized class.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
     * @param groupName Name of the group ("JvmRuntime")
90ce3da70b43 Initial load
duke
parents:
diff changeset
   369
     * @param groupOid  OID of this group
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
     * @param groupObjname ObjectName for this group (may be null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
     * @param server    MBeanServer for this group (may be null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
     * @return An instance of the metadata class generated for the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   374
     *         "JvmRuntime" group (JvmRuntimeMeta)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   375
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
     **/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   377
    protected JvmRuntimeMeta createJvmRuntimeMetaNode(String groupName,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   378
                String groupOid, ObjectName groupObjname, MBeanServer server)  {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   379
        return new JvmRuntimeMeta(this, objectserver);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   380
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   381
90ce3da70b43 Initial load
duke
parents:
diff changeset
   382
90ce3da70b43 Initial load
duke
parents:
diff changeset
   383
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
     * Factory method for "JvmRuntime" group MBean.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   385
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   386
     * You can redefine this method if you need to replace the default
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
     * generated MBean class with your own customized class.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   389
     * @param groupName Name of the group ("JvmRuntime")
90ce3da70b43 Initial load
duke
parents:
diff changeset
   390
     * @param groupOid  OID of this group
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
     * @param groupObjname ObjectName for this group (may be null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
     * @param server    MBeanServer for this group (may be null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   394
     * @return An instance of the MBean class generated for the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
     *         "JvmRuntime" group (JvmRuntime)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   396
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
     * Note that when using standard metadata,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
     * the returned object must implement the "JvmRuntimeMBean"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
     * interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
     **/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   401
    protected abstract Object createJvmRuntimeMBean(String groupName,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   402
                String groupOid,  ObjectName groupObjname, MBeanServer server);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   403
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
    // ------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
    // Initialization of the "JvmThreading" group.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
    // ------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
     * Initialization of the "JvmThreading" group.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
     * To disable support of this group, redefine the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
     * "createJvmThreadingMetaNode()" factory method, and make it return "null"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   418
     * @param server    MBeanServer for this group (may be null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   420
     **/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   421
    protected void initJvmThreading(MBeanServer server)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   422
        throws Exception {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   423
        final String oid = getGroupOid("JvmThreading", "1.3.6.1.4.1.42.2.145.3.163.1.1.3");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   424
        ObjectName objname = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   425
        if (server != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   426
            objname = getGroupObjectName("JvmThreading", oid, mibName + ":name=sun.management.snmp.jvmmib.JvmThreading");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   427
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   428
        final JvmThreadingMeta meta = createJvmThreadingMetaNode("JvmThreading", oid, objname, server);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   429
        if (meta != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   430
            meta.registerTableNodes( this, server );
90ce3da70b43 Initial load
duke
parents:
diff changeset
   431
90ce3da70b43 Initial load
duke
parents:
diff changeset
   432
            // Note that when using standard metadata,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   433
            // the returned object must implement the "JvmThreadingMBean"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   434
            // interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   435
            //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   436
            final JvmThreadingMBean group = (JvmThreadingMBean) createJvmThreadingMBean("JvmThreading", oid, objname, server);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   437
            meta.setInstance( group );
90ce3da70b43 Initial load
duke
parents:
diff changeset
   438
            registerGroupNode("JvmThreading", oid, objname, meta, group, server);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   439
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   440
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   441
90ce3da70b43 Initial load
duke
parents:
diff changeset
   442
90ce3da70b43 Initial load
duke
parents:
diff changeset
   443
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   444
     * Factory method for "JvmThreading" group metadata class.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   445
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   446
     * You can redefine this method if you need to replace the default
90ce3da70b43 Initial load
duke
parents:
diff changeset
   447
     * generated metadata class with your own customized class.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   448
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   449
     * @param groupName Name of the group ("JvmThreading")
90ce3da70b43 Initial load
duke
parents:
diff changeset
   450
     * @param groupOid  OID of this group
90ce3da70b43 Initial load
duke
parents:
diff changeset
   451
     * @param groupObjname ObjectName for this group (may be null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   452
     * @param server    MBeanServer for this group (may be null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   453
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   454
     * @return An instance of the metadata class generated for the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   455
     *         "JvmThreading" group (JvmThreadingMeta)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   456
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   457
     **/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   458
    protected JvmThreadingMeta createJvmThreadingMetaNode(String groupName,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   459
                String groupOid, ObjectName groupObjname, MBeanServer server)  {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   460
        return new JvmThreadingMeta(this, objectserver);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   461
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   462
90ce3da70b43 Initial load
duke
parents:
diff changeset
   463
90ce3da70b43 Initial load
duke
parents:
diff changeset
   464
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   465
     * Factory method for "JvmThreading" group MBean.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   466
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   467
     * You can redefine this method if you need to replace the default
90ce3da70b43 Initial load
duke
parents:
diff changeset
   468
     * generated MBean class with your own customized class.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   469
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   470
     * @param groupName Name of the group ("JvmThreading")
90ce3da70b43 Initial load
duke
parents:
diff changeset
   471
     * @param groupOid  OID of this group
90ce3da70b43 Initial load
duke
parents:
diff changeset
   472
     * @param groupObjname ObjectName for this group (may be null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   473
     * @param server    MBeanServer for this group (may be null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   474
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   475
     * @return An instance of the MBean class generated for the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   476
     *         "JvmThreading" group (JvmThreading)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   477
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   478
     * Note that when using standard metadata,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   479
     * the returned object must implement the "JvmThreadingMBean"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   480
     * interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   481
     **/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   482
    protected abstract Object createJvmThreadingMBean(String groupName,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   483
                String groupOid,  ObjectName groupObjname, MBeanServer server);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   484
90ce3da70b43 Initial load
duke
parents:
diff changeset
   485
90ce3da70b43 Initial load
duke
parents:
diff changeset
   486
    // ------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   487
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   488
    // Initialization of the "JvmMemory" group.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   489
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   490
    // ------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   491
90ce3da70b43 Initial load
duke
parents:
diff changeset
   492
90ce3da70b43 Initial load
duke
parents:
diff changeset
   493
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   494
     * Initialization of the "JvmMemory" group.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   495
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   496
     * To disable support of this group, redefine the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   497
     * "createJvmMemoryMetaNode()" factory method, and make it return "null"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   498
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   499
     * @param server    MBeanServer for this group (may be null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   500
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   501
     **/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   502
    protected void initJvmMemory(MBeanServer server)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   503
        throws Exception {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   504
        final String oid = getGroupOid("JvmMemory", "1.3.6.1.4.1.42.2.145.3.163.1.1.2");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   505
        ObjectName objname = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   506
        if (server != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   507
            objname = getGroupObjectName("JvmMemory", oid, mibName + ":name=sun.management.snmp.jvmmib.JvmMemory");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   508
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   509
        final JvmMemoryMeta meta = createJvmMemoryMetaNode("JvmMemory", oid, objname, server);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   510
        if (meta != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   511
            meta.registerTableNodes( this, server );
90ce3da70b43 Initial load
duke
parents:
diff changeset
   512
90ce3da70b43 Initial load
duke
parents:
diff changeset
   513
            // Note that when using standard metadata,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   514
            // the returned object must implement the "JvmMemoryMBean"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   515
            // interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   516
            //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   517
            final JvmMemoryMBean group = (JvmMemoryMBean) createJvmMemoryMBean("JvmMemory", oid, objname, server);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   518
            meta.setInstance( group );
90ce3da70b43 Initial load
duke
parents:
diff changeset
   519
            registerGroupNode("JvmMemory", oid, objname, meta, group, server);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   520
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   521
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   522
90ce3da70b43 Initial load
duke
parents:
diff changeset
   523
90ce3da70b43 Initial load
duke
parents:
diff changeset
   524
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   525
     * Factory method for "JvmMemory" group metadata class.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   526
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   527
     * You can redefine this method if you need to replace the default
90ce3da70b43 Initial load
duke
parents:
diff changeset
   528
     * generated metadata class with your own customized class.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   529
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   530
     * @param groupName Name of the group ("JvmMemory")
90ce3da70b43 Initial load
duke
parents:
diff changeset
   531
     * @param groupOid  OID of this group
90ce3da70b43 Initial load
duke
parents:
diff changeset
   532
     * @param groupObjname ObjectName for this group (may be null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   533
     * @param server    MBeanServer for this group (may be null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   534
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   535
     * @return An instance of the metadata class generated for the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   536
     *         "JvmMemory" group (JvmMemoryMeta)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   537
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   538
     **/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   539
    protected JvmMemoryMeta createJvmMemoryMetaNode(String groupName,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   540
                String groupOid, ObjectName groupObjname, MBeanServer server)  {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   541
        return new JvmMemoryMeta(this, objectserver);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   542
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   543
90ce3da70b43 Initial load
duke
parents:
diff changeset
   544
90ce3da70b43 Initial load
duke
parents:
diff changeset
   545
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   546
     * Factory method for "JvmMemory" group MBean.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   547
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   548
     * You can redefine this method if you need to replace the default
90ce3da70b43 Initial load
duke
parents:
diff changeset
   549
     * generated MBean class with your own customized class.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   550
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   551
     * @param groupName Name of the group ("JvmMemory")
90ce3da70b43 Initial load
duke
parents:
diff changeset
   552
     * @param groupOid  OID of this group
90ce3da70b43 Initial load
duke
parents:
diff changeset
   553
     * @param groupObjname ObjectName for this group (may be null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   554
     * @param server    MBeanServer for this group (may be null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   555
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   556
     * @return An instance of the MBean class generated for the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   557
     *         "JvmMemory" group (JvmMemory)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   558
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   559
     * Note that when using standard metadata,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   560
     * the returned object must implement the "JvmMemoryMBean"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   561
     * interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   562
     **/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   563
    protected abstract Object createJvmMemoryMBean(String groupName,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   564
                String groupOid,  ObjectName groupObjname, MBeanServer server);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   565
90ce3da70b43 Initial load
duke
parents:
diff changeset
   566
90ce3da70b43 Initial load
duke
parents:
diff changeset
   567
    // ------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   568
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   569
    // Initialization of the "JvmClassLoading" group.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   570
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   571
    // ------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   572
90ce3da70b43 Initial load
duke
parents:
diff changeset
   573
90ce3da70b43 Initial load
duke
parents:
diff changeset
   574
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   575
     * Initialization of the "JvmClassLoading" group.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   576
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   577
     * To disable support of this group, redefine the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   578
     * "createJvmClassLoadingMetaNode()" factory method, and make it return "null"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   579
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   580
     * @param server    MBeanServer for this group (may be null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   581
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   582
     **/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   583
    protected void initJvmClassLoading(MBeanServer server)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   584
        throws Exception {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   585
        final String oid = getGroupOid("JvmClassLoading", "1.3.6.1.4.1.42.2.145.3.163.1.1.1");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   586
        ObjectName objname = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   587
        if (server != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   588
            objname = getGroupObjectName("JvmClassLoading", oid, mibName + ":name=sun.management.snmp.jvmmib.JvmClassLoading");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   589
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   590
        final JvmClassLoadingMeta meta = createJvmClassLoadingMetaNode("JvmClassLoading", oid, objname, server);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   591
        if (meta != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   592
            meta.registerTableNodes( this, server );
90ce3da70b43 Initial load
duke
parents:
diff changeset
   593
90ce3da70b43 Initial load
duke
parents:
diff changeset
   594
            // Note that when using standard metadata,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   595
            // the returned object must implement the "JvmClassLoadingMBean"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   596
            // interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   597
            //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   598
            final JvmClassLoadingMBean group = (JvmClassLoadingMBean) createJvmClassLoadingMBean("JvmClassLoading", oid, objname, server);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   599
            meta.setInstance( group );
90ce3da70b43 Initial load
duke
parents:
diff changeset
   600
            registerGroupNode("JvmClassLoading", oid, objname, meta, group, server);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   601
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   602
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   603
90ce3da70b43 Initial load
duke
parents:
diff changeset
   604
90ce3da70b43 Initial load
duke
parents:
diff changeset
   605
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   606
     * Factory method for "JvmClassLoading" group metadata class.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   607
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   608
     * You can redefine this method if you need to replace the default
90ce3da70b43 Initial load
duke
parents:
diff changeset
   609
     * generated metadata class with your own customized class.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   610
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   611
     * @param groupName Name of the group ("JvmClassLoading")
90ce3da70b43 Initial load
duke
parents:
diff changeset
   612
     * @param groupOid  OID of this group
90ce3da70b43 Initial load
duke
parents:
diff changeset
   613
     * @param groupObjname ObjectName for this group (may be null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   614
     * @param server    MBeanServer for this group (may be null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   615
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   616
     * @return An instance of the metadata class generated for the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   617
     *         "JvmClassLoading" group (JvmClassLoadingMeta)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   618
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   619
     **/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   620
    protected JvmClassLoadingMeta createJvmClassLoadingMetaNode(String groupName,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   621
                String groupOid, ObjectName groupObjname, MBeanServer server)  {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   622
        return new JvmClassLoadingMeta(this, objectserver);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   623
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   624
90ce3da70b43 Initial load
duke
parents:
diff changeset
   625
90ce3da70b43 Initial load
duke
parents:
diff changeset
   626
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   627
     * Factory method for "JvmClassLoading" group MBean.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   628
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   629
     * You can redefine this method if you need to replace the default
90ce3da70b43 Initial load
duke
parents:
diff changeset
   630
     * generated MBean class with your own customized class.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   631
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   632
     * @param groupName Name of the group ("JvmClassLoading")
90ce3da70b43 Initial load
duke
parents:
diff changeset
   633
     * @param groupOid  OID of this group
90ce3da70b43 Initial load
duke
parents:
diff changeset
   634
     * @param groupObjname ObjectName for this group (may be null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   635
     * @param server    MBeanServer for this group (may be null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   636
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   637
     * @return An instance of the MBean class generated for the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   638
     *         "JvmClassLoading" group (JvmClassLoading)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   639
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   640
     * Note that when using standard metadata,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   641
     * the returned object must implement the "JvmClassLoadingMBean"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   642
     * interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   643
     **/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   644
    protected abstract Object createJvmClassLoadingMBean(String groupName,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   645
                String groupOid,  ObjectName groupObjname, MBeanServer server);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   646
90ce3da70b43 Initial load
duke
parents:
diff changeset
   647
90ce3da70b43 Initial load
duke
parents:
diff changeset
   648
    // ------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   649
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   650
    // Implements the "registerTableMeta" method defined in "SnmpMib".
90ce3da70b43 Initial load
duke
parents:
diff changeset
   651
    // See the "SnmpMib" Javadoc API for more details.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   652
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   653
    // ------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   654
90ce3da70b43 Initial load
duke
parents:
diff changeset
   655
    public void registerTableMeta( String name, SnmpMibTable meta) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   656
        if (metadatas == null) return;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   657
        if (name == null) return;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   658
        metadatas.put(name,meta);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   659
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   660
90ce3da70b43 Initial load
duke
parents:
diff changeset
   661
90ce3da70b43 Initial load
duke
parents:
diff changeset
   662
    // ------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   663
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   664
    // Implements the "getRegisteredTableMeta" method defined in "SnmpMib".
90ce3da70b43 Initial load
duke
parents:
diff changeset
   665
    // See the "SnmpMib" Javadoc API for more details.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   666
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   667
    // ------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   668
90ce3da70b43 Initial load
duke
parents:
diff changeset
   669
    public SnmpMibTable getRegisteredTableMeta( String name ) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   670
        if (metadatas == null) return null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   671
        if (name == null) return null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   672
        return metadatas.get(name);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   673
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   674
90ce3da70b43 Initial load
duke
parents:
diff changeset
   675
    public SnmpStandardObjectServer getStandardObjectServer() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   676
        if (objectserver == null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   677
            objectserver = new SnmpStandardObjectServer();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   678
        return objectserver;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   679
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   680
90ce3da70b43 Initial load
duke
parents:
diff changeset
   681
    private boolean isInitialized = false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   682
90ce3da70b43 Initial load
duke
parents:
diff changeset
   683
    protected SnmpStandardObjectServer objectserver;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   684
90ce3da70b43 Initial load
duke
parents:
diff changeset
   685
    protected final Hashtable<String, SnmpMibTable> metadatas =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   686
            new Hashtable<String, SnmpMibTable>();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   687
}