0N/A/*
2362N/A * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A */
0N/A
0N/Apackage sun.management.snmp.jvmmib;
0N/A
0N/A//
0N/A// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
0N/A//
0N/A
0N/A// java imports
0N/A//
0N/Aimport java.io.Serializable;
0N/A
0N/A// jmx imports
0N/A//
0N/Aimport javax.management.MBeanServer;
0N/Aimport com.sun.jmx.snmp.SnmpCounter;
0N/Aimport com.sun.jmx.snmp.SnmpCounter64;
0N/Aimport com.sun.jmx.snmp.SnmpGauge;
0N/Aimport com.sun.jmx.snmp.SnmpInt;
0N/Aimport com.sun.jmx.snmp.SnmpUnsignedInt;
0N/Aimport com.sun.jmx.snmp.SnmpIpAddress;
0N/Aimport com.sun.jmx.snmp.SnmpTimeticks;
0N/Aimport com.sun.jmx.snmp.SnmpOpaque;
0N/Aimport com.sun.jmx.snmp.SnmpString;
0N/Aimport com.sun.jmx.snmp.SnmpStringFixed;
0N/Aimport com.sun.jmx.snmp.SnmpOid;
0N/Aimport com.sun.jmx.snmp.SnmpNull;
0N/Aimport com.sun.jmx.snmp.SnmpValue;
0N/Aimport com.sun.jmx.snmp.SnmpVarBind;
0N/Aimport com.sun.jmx.snmp.SnmpStatusException;
0N/A
0N/A// jdmk imports
0N/A//
0N/Aimport com.sun.jmx.snmp.agent.SnmpMib;
0N/Aimport com.sun.jmx.snmp.agent.SnmpMibGroup;
0N/Aimport com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
0N/Aimport com.sun.jmx.snmp.agent.SnmpStandardMetaServer;
0N/Aimport com.sun.jmx.snmp.agent.SnmpMibSubRequest;
0N/Aimport com.sun.jmx.snmp.agent.SnmpMibTable;
0N/Aimport com.sun.jmx.snmp.EnumRowStatus;
0N/Aimport com.sun.jmx.snmp.SnmpDefinitions;
0N/A
0N/A/**
0N/A * The class is used for representing SNMP metadata for the "JvmRuntime" group.
0N/A * The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.4.
0N/A */
0N/Apublic class JvmRuntimeMeta extends SnmpMibGroup
0N/A implements Serializable, SnmpStandardMetaServer {
0N/A
0N/A /**
0N/A * Constructor for the metadata associated to "JvmRuntime".
0N/A */
0N/A public JvmRuntimeMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
0N/A objectserver = objserv;
0N/A try {
0N/A registerObject(23);
0N/A registerObject(22);
0N/A registerObject(21);
0N/A registerObject(9);
0N/A registerObject(20);
0N/A registerObject(8);
0N/A registerObject(7);
0N/A registerObject(6);
0N/A registerObject(5);
0N/A registerObject(4);
0N/A registerObject(3);
0N/A registerObject(12);
0N/A registerObject(11);
0N/A registerObject(2);
0N/A registerObject(1);
0N/A registerObject(10);
0N/A } catch (IllegalAccessException e) {
0N/A throw new RuntimeException(e.getMessage());
0N/A }
0N/A }
0N/A
0N/A /**
0N/A * Get the value of a scalar variable
0N/A */
0N/A public SnmpValue get(long var, Object data)
0N/A throws SnmpStatusException {
0N/A switch((int)var) {
0N/A case 23: {
0N/A throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
0N/A }
0N/A
0N/A case 22: {
0N/A throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
0N/A }
0N/A
0N/A case 21: {
0N/A throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
0N/A }
0N/A
0N/A case 9:
0N/A return new SnmpInt(node.getJvmRTBootClassPathSupport());
0N/A
0N/A case 20: {
0N/A throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
0N/A }
0N/A
0N/A case 8:
0N/A return new SnmpString(node.getJvmRTManagementSpecVersion());
0N/A
0N/A case 7:
0N/A return new SnmpString(node.getJvmRTSpecVersion());
0N/A
0N/A case 6:
0N/A return new SnmpString(node.getJvmRTSpecVendor());
0N/A
0N/A case 5:
0N/A return new SnmpString(node.getJvmRTSpecName());
0N/A
0N/A case 4:
0N/A return new SnmpString(node.getJvmRTVMVersion());
0N/A
0N/A case 3:
0N/A return new SnmpString(node.getJvmRTVMVendor());
0N/A
0N/A case 12:
0N/A return new SnmpCounter64(node.getJvmRTStartTimeMs());
0N/A
0N/A case 11:
0N/A return new SnmpCounter64(node.getJvmRTUptimeMs());
0N/A
0N/A case 2:
0N/A return new SnmpString(node.getJvmRTVMName());
0N/A
0N/A case 1:
0N/A return new SnmpString(node.getJvmRTName());
0N/A
0N/A case 10:
0N/A return new SnmpInt(node.getJvmRTInputArgsCount());
0N/A
0N/A default:
0N/A break;
0N/A }
0N/A throw new SnmpStatusException(SnmpStatusException.noSuchObject);
0N/A }
0N/A
0N/A /**
0N/A * Set the value of a scalar variable
0N/A */
0N/A public SnmpValue set(SnmpValue x, long var, Object data)
0N/A throws SnmpStatusException {
0N/A switch((int)var) {
0N/A case 23: {
0N/A throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
0N/A }
0N/A
0N/A case 22: {
0N/A throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
0N/A }
0N/A
0N/A case 21: {
0N/A throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
0N/A }
0N/A
0N/A case 9:
0N/A throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
0N/A
0N/A case 20: {
0N/A throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
0N/A }
0N/A
0N/A case 8:
0N/A throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
0N/A
0N/A case 7:
0N/A throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
0N/A
0N/A case 6:
0N/A throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
0N/A
0N/A case 5:
0N/A throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
0N/A
0N/A case 4:
0N/A throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
0N/A
0N/A case 3:
0N/A throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
0N/A
0N/A case 12:
0N/A throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
0N/A
0N/A case 11:
0N/A throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
0N/A
0N/A case 2:
0N/A throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
0N/A
0N/A case 1:
0N/A throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
0N/A
0N/A case 10:
0N/A throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
0N/A
0N/A default:
0N/A break;
0N/A }
0N/A throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
0N/A }
0N/A
0N/A /**
0N/A * Check the value of a scalar variable
0N/A */
0N/A public void check(SnmpValue x, long var, Object data)
0N/A throws SnmpStatusException {
0N/A switch((int) var) {
0N/A case 23: {
0N/A throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
0N/A }
0N/A
0N/A case 22: {
0N/A throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
0N/A }
0N/A
0N/A case 21: {
0N/A throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
0N/A }
0N/A
0N/A case 9:
0N/A throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
0N/A
0N/A case 20: {
0N/A throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
0N/A }
0N/A
0N/A case 8:
0N/A throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
0N/A
0N/A case 7:
0N/A throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
0N/A
0N/A case 6:
0N/A throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
0N/A
0N/A case 5:
0N/A throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
0N/A
0N/A case 4:
0N/A throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
0N/A
0N/A case 3:
0N/A throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
0N/A
0N/A case 12:
0N/A throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
0N/A
0N/A case 11:
0N/A throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
0N/A
0N/A case 2:
0N/A throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
0N/A
0N/A case 1:
0N/A throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
0N/A
0N/A case 10:
0N/A throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
0N/A
0N/A default:
0N/A throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
0N/A }
0N/A }
0N/A
0N/A /**
0N/A * Allow to bind the metadata description to a specific object.
0N/A */
0N/A protected void setInstance(JvmRuntimeMBean var) {
0N/A node = var;
0N/A }
0N/A
0N/A
0N/A // ------------------------------------------------------------
0N/A //
0N/A // Implements the "get" method defined in "SnmpMibGroup".
0N/A // See the "SnmpMibGroup" Javadoc API for more details.
0N/A //
0N/A // ------------------------------------------------------------
0N/A
0N/A public void get(SnmpMibSubRequest req, int depth)
0N/A throws SnmpStatusException {
0N/A objectserver.get(this,req,depth);
0N/A }
0N/A
0N/A
0N/A // ------------------------------------------------------------
0N/A //
0N/A // Implements the "set" method defined in "SnmpMibGroup".
0N/A // See the "SnmpMibGroup" Javadoc API for more details.
0N/A //
0N/A // ------------------------------------------------------------
0N/A
0N/A public void set(SnmpMibSubRequest req, int depth)
0N/A throws SnmpStatusException {
0N/A objectserver.set(this,req,depth);
0N/A }
0N/A
0N/A
0N/A // ------------------------------------------------------------
0N/A //
0N/A // Implements the "check" method defined in "SnmpMibGroup".
0N/A // See the "SnmpMibGroup" Javadoc API for more details.
0N/A //
0N/A // ------------------------------------------------------------
0N/A
0N/A public void check(SnmpMibSubRequest req, int depth)
0N/A throws SnmpStatusException {
0N/A objectserver.check(this,req,depth);
0N/A }
0N/A
0N/A /**
0N/A * Returns true if "arc" identifies a scalar object.
0N/A */
0N/A public boolean isVariable(long arc) {
0N/A
0N/A switch((int)arc) {
0N/A case 9:
0N/A case 8:
0N/A case 7:
0N/A case 6:
0N/A case 5:
0N/A case 4:
0N/A case 3:
0N/A case 12:
0N/A case 11:
0N/A case 2:
0N/A case 1:
0N/A case 10:
0N/A return true;
0N/A default:
0N/A break;
0N/A }
0N/A return false;
0N/A }
0N/A
0N/A /**
0N/A * Returns true if "arc" identifies a readable scalar object.
0N/A */
0N/A public boolean isReadable(long arc) {
0N/A
0N/A switch((int)arc) {
0N/A case 9:
0N/A case 8:
0N/A case 7:
0N/A case 6:
0N/A case 5:
0N/A case 4:
0N/A case 3:
0N/A case 12:
0N/A case 11:
0N/A case 2:
0N/A case 1:
0N/A case 10:
0N/A return true;
0N/A default:
0N/A break;
0N/A }
0N/A return false;
0N/A }
0N/A
0N/A
0N/A // ------------------------------------------------------------
0N/A //
0N/A // Implements the "skipVariable" method defined in "SnmpMibGroup".
0N/A // See the "SnmpMibGroup" Javadoc API for more details.
0N/A //
0N/A // ------------------------------------------------------------
0N/A
0N/A public boolean skipVariable(long var, Object data, int pduVersion) {
0N/A switch((int)var) {
0N/A case 12:
0N/A case 11:
0N/A if (pduVersion==SnmpDefinitions.snmpVersionOne) return true;
0N/A break;
0N/A default:
0N/A break;
0N/A }
0N/A return super.skipVariable(var,data,pduVersion);
0N/A }
0N/A
0N/A /**
0N/A * Return the name of the attribute corresponding to the SNMP variable identified by "id".
0N/A */
0N/A public String getAttributeName(long id)
0N/A throws SnmpStatusException {
0N/A switch((int)id) {
0N/A case 23: {
0N/A throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
0N/A }
0N/A
0N/A case 22: {
0N/A throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
0N/A }
0N/A
0N/A case 21: {
0N/A throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
0N/A }
0N/A
0N/A case 9:
0N/A return "JvmRTBootClassPathSupport";
0N/A
0N/A case 20: {
0N/A throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
0N/A }
0N/A
0N/A case 8:
0N/A return "JvmRTManagementSpecVersion";
0N/A
0N/A case 7:
0N/A return "JvmRTSpecVersion";
0N/A
0N/A case 6:
0N/A return "JvmRTSpecVendor";
0N/A
0N/A case 5:
0N/A return "JvmRTSpecName";
0N/A
0N/A case 4:
0N/A return "JvmRTVMVersion";
0N/A
0N/A case 3:
0N/A return "JvmRTVMVendor";
0N/A
0N/A case 12:
0N/A return "JvmRTStartTimeMs";
0N/A
0N/A case 11:
0N/A return "JvmRTUptimeMs";
0N/A
0N/A case 2:
0N/A return "JvmRTVMName";
0N/A
0N/A case 1:
0N/A return "JvmRTName";
0N/A
0N/A case 10:
0N/A return "JvmRTInputArgsCount";
0N/A
0N/A default:
0N/A break;
0N/A }
0N/A throw new SnmpStatusException(SnmpStatusException.noSuchObject);
0N/A }
0N/A
0N/A /**
0N/A * Returns true if "arc" identifies a table object.
0N/A */
0N/A public boolean isTable(long arc) {
0N/A
0N/A switch((int)arc) {
0N/A case 23:
0N/A return true;
0N/A case 22:
0N/A return true;
0N/A case 21:
0N/A return true;
0N/A case 20:
0N/A return true;
0N/A default:
0N/A break;
0N/A }
0N/A return false;
0N/A }
0N/A
0N/A /**
0N/A * Returns the table object identified by "arc".
0N/A */
0N/A public SnmpMibTable getTable(long arc) {
0N/A
0N/A switch((int)arc) {
0N/A case 23:
0N/A return tableJvmRTLibraryPathTable;
0N/A case 22:
0N/A return tableJvmRTClassPathTable;
0N/A case 21:
0N/A return tableJvmRTBootClassPathTable;
0N/A case 20:
0N/A return tableJvmRTInputArgsTable;
0N/A default:
0N/A break;
0N/A }
0N/A return null;
0N/A }
0N/A
0N/A /**
0N/A * Register the group's SnmpMibTable objects with the meta-data.
0N/A */
0N/A public void registerTableNodes(SnmpMib mib, MBeanServer server) {
0N/A tableJvmRTLibraryPathTable = createJvmRTLibraryPathTableMetaNode("JvmRTLibraryPathTable", "JvmRuntime", mib, server);
0N/A if ( tableJvmRTLibraryPathTable != null) {
0N/A tableJvmRTLibraryPathTable.registerEntryNode(mib,server);
0N/A mib.registerTableMeta("JvmRTLibraryPathTable", tableJvmRTLibraryPathTable);
0N/A }
0N/A
0N/A tableJvmRTClassPathTable = createJvmRTClassPathTableMetaNode("JvmRTClassPathTable", "JvmRuntime", mib, server);
0N/A if ( tableJvmRTClassPathTable != null) {
0N/A tableJvmRTClassPathTable.registerEntryNode(mib,server);
0N/A mib.registerTableMeta("JvmRTClassPathTable", tableJvmRTClassPathTable);
0N/A }
0N/A
0N/A tableJvmRTBootClassPathTable = createJvmRTBootClassPathTableMetaNode("JvmRTBootClassPathTable", "JvmRuntime", mib, server);
0N/A if ( tableJvmRTBootClassPathTable != null) {
0N/A tableJvmRTBootClassPathTable.registerEntryNode(mib,server);
0N/A mib.registerTableMeta("JvmRTBootClassPathTable", tableJvmRTBootClassPathTable);
0N/A }
0N/A
0N/A tableJvmRTInputArgsTable = createJvmRTInputArgsTableMetaNode("JvmRTInputArgsTable", "JvmRuntime", mib, server);
0N/A if ( tableJvmRTInputArgsTable != null) {
0N/A tableJvmRTInputArgsTable.registerEntryNode(mib,server);
0N/A mib.registerTableMeta("JvmRTInputArgsTable", tableJvmRTInputArgsTable);
0N/A }
0N/A
0N/A }
0N/A
0N/A
0N/A /**
0N/A * Factory method for "JvmRTLibraryPathTable" table metadata class.
0N/A *
0N/A * You can redefine this method if you need to replace the default
0N/A * generated metadata class with your own customized class.
0N/A *
0N/A * @param tableName Name of the table object ("JvmRTLibraryPathTable")
0N/A * @param groupName Name of the group to which this table belong ("JvmRuntime")
0N/A * @param mib The SnmpMib object in which this table is registered
0N/A * @param server MBeanServer for this table entries (may be null)
0N/A *
0N/A * @return An instance of the metadata class generated for the
0N/A * "JvmRTLibraryPathTable" table (JvmRTLibraryPathTableMeta)
0N/A *
0N/A **/
0N/A protected JvmRTLibraryPathTableMeta createJvmRTLibraryPathTableMetaNode(String tableName, String groupName, SnmpMib mib, MBeanServer server) {
0N/A return new JvmRTLibraryPathTableMeta(mib, objectserver);
0N/A }
0N/A
0N/A
0N/A /**
0N/A * Factory method for "JvmRTClassPathTable" table metadata class.
0N/A *
0N/A * You can redefine this method if you need to replace the default
0N/A * generated metadata class with your own customized class.
0N/A *
0N/A * @param tableName Name of the table object ("JvmRTClassPathTable")
0N/A * @param groupName Name of the group to which this table belong ("JvmRuntime")
0N/A * @param mib The SnmpMib object in which this table is registered
0N/A * @param server MBeanServer for this table entries (may be null)
0N/A *
0N/A * @return An instance of the metadata class generated for the
0N/A * "JvmRTClassPathTable" table (JvmRTClassPathTableMeta)
0N/A *
0N/A **/
0N/A protected JvmRTClassPathTableMeta createJvmRTClassPathTableMetaNode(String tableName, String groupName, SnmpMib mib, MBeanServer server) {
0N/A return new JvmRTClassPathTableMeta(mib, objectserver);
0N/A }
0N/A
0N/A
0N/A /**
0N/A * Factory method for "JvmRTBootClassPathTable" table metadata class.
0N/A *
0N/A * You can redefine this method if you need to replace the default
0N/A * generated metadata class with your own customized class.
0N/A *
0N/A * @param tableName Name of the table object ("JvmRTBootClassPathTable")
0N/A * @param groupName Name of the group to which this table belong ("JvmRuntime")
0N/A * @param mib The SnmpMib object in which this table is registered
0N/A * @param server MBeanServer for this table entries (may be null)
0N/A *
0N/A * @return An instance of the metadata class generated for the
0N/A * "JvmRTBootClassPathTable" table (JvmRTBootClassPathTableMeta)
0N/A *
0N/A **/
0N/A protected JvmRTBootClassPathTableMeta createJvmRTBootClassPathTableMetaNode(String tableName, String groupName, SnmpMib mib, MBeanServer server) {
0N/A return new JvmRTBootClassPathTableMeta(mib, objectserver);
0N/A }
0N/A
0N/A
0N/A /**
0N/A * Factory method for "JvmRTInputArgsTable" table metadata class.
0N/A *
0N/A * You can redefine this method if you need to replace the default
0N/A * generated metadata class with your own customized class.
0N/A *
0N/A * @param tableName Name of the table object ("JvmRTInputArgsTable")
0N/A * @param groupName Name of the group to which this table belong ("JvmRuntime")
0N/A * @param mib The SnmpMib object in which this table is registered
0N/A * @param server MBeanServer for this table entries (may be null)
0N/A *
0N/A * @return An instance of the metadata class generated for the
0N/A * "JvmRTInputArgsTable" table (JvmRTInputArgsTableMeta)
0N/A *
0N/A **/
0N/A protected JvmRTInputArgsTableMeta createJvmRTInputArgsTableMetaNode(String tableName, String groupName, SnmpMib mib, MBeanServer server) {
0N/A return new JvmRTInputArgsTableMeta(mib, objectserver);
0N/A }
0N/A
0N/A protected JvmRuntimeMBean node;
0N/A protected SnmpStandardObjectServer objectserver = null;
0N/A protected JvmRTLibraryPathTableMeta tableJvmRTLibraryPathTable = null;
0N/A protected JvmRTClassPathTableMeta tableJvmRTClassPathTable = null;
0N/A protected JvmRTBootClassPathTableMeta tableJvmRTBootClassPathTable = null;
0N/A protected JvmRTInputArgsTableMeta tableJvmRTInputArgsTable = null;
0N/A}