jdk/src/share/classes/sun/management/snmp/jvmmib/JvmThreadInstanceTableMeta.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, 2004, 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.Vector;
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 com.sun.jmx.snmp.SnmpCounter;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
import com.sun.jmx.snmp.SnmpCounter64;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
import com.sun.jmx.snmp.SnmpGauge;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
import com.sun.jmx.snmp.SnmpInt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
import com.sun.jmx.snmp.SnmpUnsignedInt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
import com.sun.jmx.snmp.SnmpIpAddress;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
import com.sun.jmx.snmp.SnmpTimeticks;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
import com.sun.jmx.snmp.SnmpOpaque;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
import com.sun.jmx.snmp.SnmpString;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
import com.sun.jmx.snmp.SnmpStringFixed;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
import com.sun.jmx.snmp.SnmpOid;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
import com.sun.jmx.snmp.SnmpNull;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
import com.sun.jmx.snmp.SnmpValue;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
import com.sun.jmx.snmp.SnmpVarBind;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
import com.sun.jmx.snmp.SnmpStatusException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
// jdmk imports
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
//
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
import com.sun.jmx.snmp.agent.SnmpIndex;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
import com.sun.jmx.snmp.agent.SnmpMib;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
import com.sun.jmx.snmp.agent.SnmpMibTable;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
 * The class is used for implementing the "JvmThreadInstanceTable" group.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
 * The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.3.10.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
public class JvmThreadInstanceTableMeta extends SnmpMibTable implements Serializable {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
11530
a9d059c15b80 7117570: Warnings in sun.mangement.* and its subpackages
mchung
parents: 5506
diff changeset
    71
    static final long serialVersionUID = 2519514732589115954L;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
     * Constructor for the table. Initialize metadata for "JvmThreadInstanceTableMeta".
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
     * The reference on the MBean server is updated so the entries created through an SNMP SET will be AUTOMATICALLY REGISTERED in Java DMK.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
    public JvmThreadInstanceTableMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
        super(myMib);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
        objectserver = objserv;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
     * Factory method for "JvmThreadInstanceEntry" entry metadata class.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
     * You can redefine this method if you need to replace the default
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
     * generated metadata class with your own customized class.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
     * @param snmpEntryName Name of the SNMP Entry object (conceptual row) ("JvmThreadInstanceEntry")
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
     * @param tableName Name of the table in which the entries are registered ("JvmThreadInstanceTable")
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
     * @param mib The SnmpMib object in which this table is registered
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
     * @param server MBeanServer for this table entries (may be null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
     * @return An instance of the metadata class generated for the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
     *         "JvmThreadInstanceEntry" conceptual row (JvmThreadInstanceEntryMeta)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
     **/
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
    protected JvmThreadInstanceEntryMeta createJvmThreadInstanceEntryMetaNode(String snmpEntryName, String tableName, SnmpMib mib, MBeanServer server)  {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
        return new JvmThreadInstanceEntryMeta(mib, objectserver);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
    // ------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
    // Implements the "createNewEntry" method defined in "SnmpMibTable".
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
    // See the "SnmpMibTable" Javadoc API for more details.
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
    public void createNewEntry(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
        throws SnmpStatusException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
        if (factory != null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
            factory.createNewEntry(req, rowOid, depth, this);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
        else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
            throw new SnmpStatusException(
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
                SnmpStatusException.snmpRspNoAccess);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
    // ------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
    // Implements the "isRegistrationRequired" method defined in "SnmpMibTable".
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
    // See the "SnmpMibTable" Javadoc API for more details.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
    // ------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
    public boolean isRegistrationRequired()  {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
        return false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
    public void registerEntryNode(SnmpMib mib, MBeanServer server)  {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
        node = createJvmThreadInstanceEntryMetaNode("JvmThreadInstanceEntry", "JvmThreadInstanceTable", mib, server);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
    // ------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
    // Implements the "addEntry" method defined in "SnmpMibTable".
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
    // See the "SnmpMibTable" Javadoc API for more details.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
    // ------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
    public synchronized void addEntry(SnmpOid rowOid, ObjectName objname,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
                 Object entry)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
        throws SnmpStatusException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
        if (! (entry instanceof JvmThreadInstanceEntryMBean) )
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
            throw new ClassCastException("Entries for Table \"" +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
                           "JvmThreadInstanceTable" + "\" must implement the \"" +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
                           "JvmThreadInstanceEntryMBean" + "\" interface.");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
        super.addEntry(rowOid, objname, entry);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
    // ------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
    // Implements the "get" method defined in "SnmpMibTable".
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
    // See the "SnmpMibTable" Javadoc API for more details.
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
    public void get(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
        throws SnmpStatusException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
        JvmThreadInstanceEntryMBean entry = (JvmThreadInstanceEntryMBean) getEntry(rowOid);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
        synchronized (this) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
            node.setInstance(entry);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
            node.get(req,depth);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
    // ------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
    // Implements the "set" method defined in "SnmpMibTable".
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
    // See the "SnmpMibTable" Javadoc API for more details.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
    // ------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
    public void set(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
        throws SnmpStatusException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
        if (req.getSize() == 0) return;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
        JvmThreadInstanceEntryMBean entry = (JvmThreadInstanceEntryMBean) getEntry(rowOid);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
        synchronized (this) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
            node.setInstance(entry);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
            node.set(req,depth);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
    // ------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
    // Implements the "check" method defined in "SnmpMibTable".
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
    // See the "SnmpMibTable" Javadoc API for more details.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
    // ------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
    public void check(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
        throws SnmpStatusException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
        if (req.getSize() == 0) return;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
        JvmThreadInstanceEntryMBean entry = (JvmThreadInstanceEntryMBean) getEntry(rowOid);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
        synchronized (this) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
            node.setInstance(entry);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
            node.check(req,depth);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
     * check that the given "var" identifies a columnar object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
    public void validateVarEntryId( SnmpOid rowOid, long var, Object data )
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
        throws SnmpStatusException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
        node.validateVarId(var, data);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
     * Returns true if "var" identifies a readable scalar object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
    public boolean isReadableEntryId( SnmpOid rowOid, long var, Object data )
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
        throws SnmpStatusException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
        return node.isReadable(var);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
     * Returns the arc of the next columnar object following "var".
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
    public long getNextVarEntryId( SnmpOid rowOid, long var, Object data )
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
        throws SnmpStatusException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
        long nextvar = node.getNextVarId(var, data);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
        while (!isReadableEntryId(rowOid, nextvar, data))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
            nextvar = node.getNextVarId(nextvar, data);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
        return nextvar;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
    // ------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
    // Implements the "skipEntryVariable" method defined in "SnmpMibTable".
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
    // See the "SnmpMibTable" Javadoc API for more details.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
    // ------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
    public boolean skipEntryVariable( SnmpOid rowOid, long var, Object data, int pduVersion) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
            JvmThreadInstanceEntryMBean entry = (JvmThreadInstanceEntryMBean) getEntry(rowOid);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
            synchronized (this) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
                node.setInstance(entry);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
                return node.skipVariable(var, data, pduVersion);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
        } catch (SnmpStatusException x) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
            return false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
     * Reference to the entry metadata.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
    private JvmThreadInstanceEntryMeta node;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
     * Reference to the object server.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
    protected SnmpStandardObjectServer objectserver;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
}