0N/A/*
2362N/A * Copyright (c) 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/Aimport java.util.Vector;
0N/A
0N/A// jmx imports
0N/A//
0N/Aimport javax.management.MBeanServer;
0N/Aimport javax.management.ObjectName;
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.SnmpIndex;
0N/Aimport com.sun.jmx.snmp.agent.SnmpMib;
0N/Aimport com.sun.jmx.snmp.agent.SnmpMibTable;
0N/Aimport com.sun.jmx.snmp.agent.SnmpMibSubRequest;
0N/Aimport com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
0N/A
0N/A/**
0N/A * The class is used for implementing the "JvmRTBootClassPathTable" 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.21.
0N/A */
0N/Apublic class JvmRTBootClassPathTableMeta extends SnmpMibTable implements Serializable {
0N/A
0N/A /**
0N/A * Constructor for the table. Initialize metadata for "JvmRTBootClassPathTableMeta".
0N/A * The reference on the MBean server is updated so the entries created through an SNMP SET will be AUTOMATICALLY REGISTERED in Java DMK.
0N/A */
0N/A public JvmRTBootClassPathTableMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
0N/A super(myMib);
0N/A objectserver = objserv;
0N/A }
0N/A
0N/A
0N/A /**
0N/A * Factory method for "JvmRTBootClassPathEntry" entry 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 snmpEntryName Name of the SNMP Entry object (conceptual row) ("JvmRTBootClassPathEntry")
0N/A * @param tableName Name of the table in which the entries are registered ("JvmRTBootClassPathTable")
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 * "JvmRTBootClassPathEntry" conceptual row (JvmRTBootClassPathEntryMeta)
0N/A *
0N/A **/
0N/A protected JvmRTBootClassPathEntryMeta createJvmRTBootClassPathEntryMetaNode(String snmpEntryName, String tableName, SnmpMib mib, MBeanServer server) {
0N/A return new JvmRTBootClassPathEntryMeta(mib, objectserver);
0N/A }
0N/A
0N/A
0N/A // ------------------------------------------------------------
0N/A //
0N/A // Implements the "createNewEntry" method defined in "SnmpMibTable".
0N/A // See the "SnmpMibTable" Javadoc API for more details.
0N/A //
0N/A // ------------------------------------------------------------
0N/A
0N/A public void createNewEntry(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
0N/A throws SnmpStatusException {
0N/A if (factory != null)
0N/A factory.createNewEntry(req, rowOid, depth, this);
0N/A else
0N/A throw new SnmpStatusException(
0N/A SnmpStatusException.snmpRspNoAccess);
0N/A }
0N/A
0N/A
0N/A
0N/A // ------------------------------------------------------------
0N/A //
0N/A // Implements the "isRegistrationRequired" method defined in "SnmpMibTable".
0N/A // See the "SnmpMibTable" Javadoc API for more details.
0N/A //
0N/A // ------------------------------------------------------------
0N/A
0N/A public boolean isRegistrationRequired() {
0N/A return false;
0N/A }
0N/A
0N/A
0N/A
0N/A public void registerEntryNode(SnmpMib mib, MBeanServer server) {
0N/A node = createJvmRTBootClassPathEntryMetaNode("JvmRTBootClassPathEntry", "JvmRTBootClassPathTable", mib, server);
0N/A }
0N/A
0N/A
0N/A // ------------------------------------------------------------
0N/A //
0N/A // Implements the "addEntry" method defined in "SnmpMibTable".
0N/A // See the "SnmpMibTable" Javadoc API for more details.
0N/A //
0N/A // ------------------------------------------------------------
0N/A
0N/A public synchronized void addEntry(SnmpOid rowOid, ObjectName objname,
0N/A Object entry)
0N/A throws SnmpStatusException {
0N/A if (! (entry instanceof JvmRTBootClassPathEntryMBean) )
0N/A throw new ClassCastException("Entries for Table \"" +
0N/A "JvmRTBootClassPathTable" + "\" must implement the \"" +
0N/A "JvmRTBootClassPathEntryMBean" + "\" interface.");
0N/A super.addEntry(rowOid, objname, entry);
0N/A }
0N/A
0N/A
0N/A // ------------------------------------------------------------
0N/A //
0N/A // Implements the "get" method defined in "SnmpMibTable".
0N/A // See the "SnmpMibTable" Javadoc API for more details.
0N/A //
0N/A // ------------------------------------------------------------
0N/A
0N/A public void get(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
0N/A throws SnmpStatusException {
0N/A JvmRTBootClassPathEntryMBean entry = (JvmRTBootClassPathEntryMBean) getEntry(rowOid);
0N/A synchronized (this) {
0N/A node.setInstance(entry);
0N/A node.get(req,depth);
0N/A }
0N/A }
0N/A
0N/A // ------------------------------------------------------------
0N/A //
0N/A // Implements the "set" method defined in "SnmpMibTable".
0N/A // See the "SnmpMibTable" Javadoc API for more details.
0N/A //
0N/A // ------------------------------------------------------------
0N/A
0N/A public void set(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
0N/A throws SnmpStatusException {
0N/A if (req.getSize() == 0) return;
0N/A
0N/A JvmRTBootClassPathEntryMBean entry = (JvmRTBootClassPathEntryMBean) getEntry(rowOid);
0N/A synchronized (this) {
0N/A node.setInstance(entry);
0N/A node.set(req,depth);
0N/A }
0N/A }
0N/A
0N/A // ------------------------------------------------------------
0N/A //
0N/A // Implements the "check" method defined in "SnmpMibTable".
0N/A // See the "SnmpMibTable" Javadoc API for more details.
0N/A //
0N/A // ------------------------------------------------------------
0N/A
0N/A public void check(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
0N/A throws SnmpStatusException {
0N/A if (req.getSize() == 0) return;
0N/A
0N/A JvmRTBootClassPathEntryMBean entry = (JvmRTBootClassPathEntryMBean) getEntry(rowOid);
0N/A synchronized (this) {
0N/A node.setInstance(entry);
0N/A node.check(req,depth);
0N/A }
0N/A }
0N/A
0N/A /**
0N/A * check that the given "var" identifies a columnar object.
0N/A */
0N/A public void validateVarEntryId( SnmpOid rowOid, long var, Object data )
0N/A throws SnmpStatusException {
0N/A node.validateVarId(var, data);
0N/A }
0N/A
0N/A /**
0N/A * Returns true if "var" identifies a readable scalar object.
0N/A */
0N/A public boolean isReadableEntryId( SnmpOid rowOid, long var, Object data )
0N/A throws SnmpStatusException {
0N/A return node.isReadable(var);
0N/A }
0N/A
0N/A /**
0N/A * Returns the arc of the next columnar object following "var".
0N/A */
0N/A public long getNextVarEntryId( SnmpOid rowOid, long var, Object data )
0N/A throws SnmpStatusException {
0N/A long nextvar = node.getNextVarId(var, data);
0N/A while (!isReadableEntryId(rowOid, nextvar, data))
0N/A nextvar = node.getNextVarId(nextvar, data);
0N/A return nextvar;
0N/A }
0N/A
0N/A // ------------------------------------------------------------
0N/A //
0N/A // Implements the "skipEntryVariable" method defined in "SnmpMibTable".
0N/A // See the "SnmpMibTable" Javadoc API for more details.
0N/A //
0N/A // ------------------------------------------------------------
0N/A
0N/A public boolean skipEntryVariable( SnmpOid rowOid, long var, Object data, int pduVersion) {
0N/A try {
0N/A JvmRTBootClassPathEntryMBean entry = (JvmRTBootClassPathEntryMBean) getEntry(rowOid);
0N/A synchronized (this) {
0N/A node.setInstance(entry);
0N/A return node.skipVariable(var, data, pduVersion);
0N/A }
0N/A } catch (SnmpStatusException x) {
0N/A return false;
0N/A }
0N/A }
0N/A
0N/A
0N/A /**
0N/A * Reference to the entry metadata.
0N/A */
0N/A private JvmRTBootClassPathEntryMeta node;
0N/A
0N/A /**
0N/A * Reference to the object server.
0N/A */
0N/A protected SnmpStandardObjectServer objectserver;
0N/A
0N/A}