jdk/src/share/classes/sun/management/snmp/jvmmib/JvmMemPoolEntryMeta.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
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
// jmx imports
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
//
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
import javax.management.MBeanServer;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
import com.sun.jmx.snmp.SnmpCounter;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
import com.sun.jmx.snmp.SnmpCounter64;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
import com.sun.jmx.snmp.SnmpGauge;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
import com.sun.jmx.snmp.SnmpInt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
import com.sun.jmx.snmp.SnmpUnsignedInt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
import com.sun.jmx.snmp.SnmpIpAddress;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
import com.sun.jmx.snmp.SnmpTimeticks;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
import com.sun.jmx.snmp.SnmpOpaque;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
import com.sun.jmx.snmp.SnmpString;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
import com.sun.jmx.snmp.SnmpStringFixed;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
import com.sun.jmx.snmp.SnmpOid;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
import com.sun.jmx.snmp.SnmpNull;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
import com.sun.jmx.snmp.SnmpValue;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
import com.sun.jmx.snmp.SnmpVarBind;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
import com.sun.jmx.snmp.SnmpStatusException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
// jdmk imports
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
//
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
import com.sun.jmx.snmp.agent.SnmpMibNode;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
import com.sun.jmx.snmp.agent.SnmpMib;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
import com.sun.jmx.snmp.agent.SnmpMibEntry;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
import com.sun.jmx.snmp.agent.SnmpStandardMetaServer;
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.SnmpMibTable;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
import com.sun.jmx.snmp.EnumRowStatus;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
import com.sun.jmx.snmp.SnmpDefinitions;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
 * The class is used for representing SNMP metadata for the "JvmMemPoolEntry" group.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
 * The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
public class JvmMemPoolEntryMeta extends SnmpMibEntry
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
     implements Serializable, SnmpStandardMetaServer {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
11530
a9d059c15b80 7117570: Warnings in sun.mangement.* and its subpackages
mchung
parents: 5506
diff changeset
    74
    static final long serialVersionUID = 7220682779249102830L;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
     * Constructor for the metadata associated to "JvmMemPoolEntry".
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
    public JvmMemPoolEntryMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
        objectserver = objserv;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
        varList = new int[20];
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
        varList[0] = 33;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
        varList[1] = 32;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
        varList[2] = 31;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
        varList[3] = 133;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
        varList[4] = 132;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
        varList[5] = 131;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
        varList[6] = 13;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
        varList[7] = 12;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
        varList[8] = 11;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
        varList[9] = 10;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
        varList[10] = 112;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
        varList[11] = 111;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
        varList[12] = 110;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
        varList[13] = 5;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
        varList[14] = 4;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
        varList[15] = 3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
        varList[16] = 2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
        varList[17] = 23;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
        varList[18] = 22;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
        varList[19] = 21;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
        SnmpMibNode.sort(varList);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
     * Get the value of a scalar variable
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
    public SnmpValue get(long var, Object data)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
        throws SnmpStatusException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
        switch((int)var) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
            case 33:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
                return new SnmpCounter64(node.getJvmMemPoolCollectMaxSize());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
            case 32:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
                return new SnmpCounter64(node.getJvmMemPoolCollectCommitted());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
            case 31:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
                return new SnmpCounter64(node.getJvmMemPoolCollectUsed());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
            case 133:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
                return new SnmpInt(node.getJvmMemPoolCollectThreshdSupport());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
            case 132:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
                return new SnmpCounter64(node.getJvmMemPoolCollectThreshdCount());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
            case 131:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
                return new SnmpCounter64(node.getJvmMemPoolCollectThreshold());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
            case 13:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
                return new SnmpCounter64(node.getJvmMemPoolMaxSize());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
            case 12:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
                return new SnmpCounter64(node.getJvmMemPoolCommitted());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
            case 11:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
                return new SnmpCounter64(node.getJvmMemPoolUsed());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
            case 10:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
                return new SnmpCounter64(node.getJvmMemPoolInitSize());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
            case 112:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
                return new SnmpInt(node.getJvmMemPoolThreshdSupport());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
            case 111:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
                return new SnmpCounter64(node.getJvmMemPoolThreshdCount());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
            case 110:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
                return new SnmpCounter64(node.getJvmMemPoolThreshold());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
            case 5:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
                return new SnmpCounter64(node.getJvmMemPoolPeakReset());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
            case 4:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
                return new SnmpInt(node.getJvmMemPoolState());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
            case 3:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
                return new SnmpInt(node.getJvmMemPoolType());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
            case 2:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
                return new SnmpString(node.getJvmMemPoolName());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
            case 23:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
                return new SnmpCounter64(node.getJvmMemPoolPeakMaxSize());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
            case 1:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
                throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
            case 22:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
                return new SnmpCounter64(node.getJvmMemPoolPeakCommitted());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
            case 21:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
                return new SnmpCounter64(node.getJvmMemPoolPeakUsed());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
            default:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
                break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
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
     * Set the value of a scalar variable
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
    public SnmpValue set(SnmpValue x, long var, Object data)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
        throws SnmpStatusException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
        switch((int)var) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
            case 33:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
            case 32:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
            case 31:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
            case 133:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
            case 132:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
            case 131:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
                if (x instanceof SnmpCounter64) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
                    node.setJvmMemPoolCollectThreshold(((SnmpCounter64)x).toLong());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
                    return new SnmpCounter64(node.getJvmMemPoolCollectThreshold());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
                } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
                    throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
            case 13:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
            case 12:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
            case 11:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
            case 10:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
            case 112:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
            case 111:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
            case 110:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
                if (x instanceof SnmpCounter64) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
                    node.setJvmMemPoolThreshold(((SnmpCounter64)x).toLong());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
                    return new SnmpCounter64(node.getJvmMemPoolThreshold());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
                } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
                    throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
            case 5:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
                if (x instanceof SnmpCounter64) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
                    node.setJvmMemPoolPeakReset(((SnmpCounter64)x).toLong());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
                    return new SnmpCounter64(node.getJvmMemPoolPeakReset());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
                } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
                    throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
            case 4:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
            case 3:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
            case 2:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
            case 23:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
            case 1:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
            case 22:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
            case 21:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
            default:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
                break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
        throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
     * Check the value of a scalar variable
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
    public void check(SnmpValue x, long var, Object data)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
        throws SnmpStatusException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
        switch((int) var) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
            case 33:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
            case 32:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
            case 31:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
            case 133:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
            case 132:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
            case 131:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
                if (x instanceof SnmpCounter64) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
                    node.checkJvmMemPoolCollectThreshold(((SnmpCounter64)x).toLong());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
                } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
                    throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
                break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
            case 13:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
            case 12:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
            case 11:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
            case 10:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
            case 112:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
            case 111:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
            case 110:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
                if (x instanceof SnmpCounter64) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
                    node.checkJvmMemPoolThreshold(((SnmpCounter64)x).toLong());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
                } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
                    throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
                break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
            case 5:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
                if (x instanceof SnmpCounter64) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
                    node.checkJvmMemPoolPeakReset(((SnmpCounter64)x).toLong());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
                } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
                    throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
                break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
            case 4:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
            case 3:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
            case 2:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
            case 23:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
            case 1:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
            case 22:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
            case 21:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   351
90ce3da70b43 Initial load
duke
parents:
diff changeset
   352
            default:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   353
                throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   354
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   355
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
90ce3da70b43 Initial load
duke
parents:
diff changeset
   357
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   358
     * Allow to bind the metadata description to a specific object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   359
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
    protected void setInstance(JvmMemPoolEntryMBean var) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   361
        node = var;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   362
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   363
90ce3da70b43 Initial load
duke
parents:
diff changeset
   364
90ce3da70b43 Initial load
duke
parents:
diff changeset
   365
    // ------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   366
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
    // Implements the "get" method defined in "SnmpMibEntry".
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
    // See the "SnmpMibEntry" Javadoc API for more details.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   369
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
    // ------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
    public void get(SnmpMibSubRequest req, int depth)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
        throws SnmpStatusException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   374
        objectserver.get(this,req,depth);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   375
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
90ce3da70b43 Initial load
duke
parents:
diff changeset
   377
90ce3da70b43 Initial load
duke
parents:
diff changeset
   378
    // ------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   379
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   380
    // Implements the "set" method defined in "SnmpMibEntry".
90ce3da70b43 Initial load
duke
parents:
diff changeset
   381
    // See the "SnmpMibEntry" Javadoc API for more details.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   382
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   383
    // ------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
90ce3da70b43 Initial load
duke
parents:
diff changeset
   385
    public void set(SnmpMibSubRequest req, int depth)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   386
        throws SnmpStatusException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
        objectserver.set(this,req,depth);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   389
90ce3da70b43 Initial load
duke
parents:
diff changeset
   390
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
    // ------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
    // Implements the "check" method defined in "SnmpMibEntry".
90ce3da70b43 Initial load
duke
parents:
diff changeset
   394
    // See the "SnmpMibEntry" Javadoc API for more details.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   396
    // ------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
    public void check(SnmpMibSubRequest req, int depth)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
        throws SnmpStatusException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
        objectserver.check(this,req,depth);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   401
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   402
90ce3da70b43 Initial load
duke
parents:
diff changeset
   403
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
     * Returns true if "arc" identifies a scalar object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
    public boolean isVariable(long arc) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
        switch((int)arc) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
            case 33:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
            case 32:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
            case 31:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
            case 133:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
            case 132:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
            case 131:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
            case 13:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
            case 12:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
            case 11:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   418
            case 10:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
            case 112:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   420
            case 111:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   421
            case 110:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   422
            case 5:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   423
            case 4:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   424
            case 3:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   425
            case 2:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   426
            case 23:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   427
            case 1:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   428
            case 22:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   429
            case 21:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   430
                return true;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   431
            default:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   432
                break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   433
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   434
        return false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   435
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   436
90ce3da70b43 Initial load
duke
parents:
diff changeset
   437
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   438
     * Returns true if "arc" identifies a readable scalar object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   439
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   440
    public boolean isReadable(long arc) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   441
90ce3da70b43 Initial load
duke
parents:
diff changeset
   442
        switch((int)arc) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   443
            case 33:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   444
            case 32:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   445
            case 31:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   446
            case 133:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   447
            case 132:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   448
            case 131:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   449
            case 13:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   450
            case 12:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   451
            case 11:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   452
            case 10:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   453
            case 112:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   454
            case 111:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   455
            case 110:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   456
            case 5:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   457
            case 4:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   458
            case 3:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   459
            case 2:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   460
            case 23:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   461
            case 22:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   462
            case 21:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   463
                return true;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   464
            default:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   465
                break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   466
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   467
        return false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   468
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   469
90ce3da70b43 Initial load
duke
parents:
diff changeset
   470
90ce3da70b43 Initial load
duke
parents:
diff changeset
   471
    // ------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   472
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   473
    // Implements the "skipVariable" method defined in "SnmpMibEntry".
90ce3da70b43 Initial load
duke
parents:
diff changeset
   474
    // See the "SnmpMibEntry" Javadoc API for more details.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   475
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   476
    // ------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   477
90ce3da70b43 Initial load
duke
parents:
diff changeset
   478
    public boolean  skipVariable(long var, Object data, int pduVersion) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   479
        switch((int)var) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   480
            case 33:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   481
            case 32:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   482
            case 31:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   483
            case 132:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   484
            case 131:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   485
            case 13:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   486
            case 12:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   487
            case 11:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   488
            case 10:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   489
            case 111:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   490
            case 110:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   491
            case 5:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   492
            case 23:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   493
                if (pduVersion==SnmpDefinitions.snmpVersionOne) return true;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   494
                break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   495
            case 1:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   496
                return true;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   497
            case 22:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   498
            case 21:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   499
                if (pduVersion==SnmpDefinitions.snmpVersionOne) return true;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   500
                break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   501
            default:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   502
                break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   503
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   504
        return super.skipVariable(var,data,pduVersion);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   505
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   506
90ce3da70b43 Initial load
duke
parents:
diff changeset
   507
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   508
     * Return the name of the attribute corresponding to the SNMP variable identified by "id".
90ce3da70b43 Initial load
duke
parents:
diff changeset
   509
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   510
    public String getAttributeName(long id)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   511
        throws SnmpStatusException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   512
        switch((int)id) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   513
            case 33:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   514
                return "JvmMemPoolCollectMaxSize";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   515
90ce3da70b43 Initial load
duke
parents:
diff changeset
   516
            case 32:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   517
                return "JvmMemPoolCollectCommitted";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   518
90ce3da70b43 Initial load
duke
parents:
diff changeset
   519
            case 31:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   520
                return "JvmMemPoolCollectUsed";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   521
90ce3da70b43 Initial load
duke
parents:
diff changeset
   522
            case 133:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   523
                return "JvmMemPoolCollectThreshdSupport";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   524
90ce3da70b43 Initial load
duke
parents:
diff changeset
   525
            case 132:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   526
                return "JvmMemPoolCollectThreshdCount";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   527
90ce3da70b43 Initial load
duke
parents:
diff changeset
   528
            case 131:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   529
                return "JvmMemPoolCollectThreshold";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   530
90ce3da70b43 Initial load
duke
parents:
diff changeset
   531
            case 13:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   532
                return "JvmMemPoolMaxSize";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   533
90ce3da70b43 Initial load
duke
parents:
diff changeset
   534
            case 12:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   535
                return "JvmMemPoolCommitted";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   536
90ce3da70b43 Initial load
duke
parents:
diff changeset
   537
            case 11:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   538
                return "JvmMemPoolUsed";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   539
90ce3da70b43 Initial load
duke
parents:
diff changeset
   540
            case 10:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   541
                return "JvmMemPoolInitSize";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   542
90ce3da70b43 Initial load
duke
parents:
diff changeset
   543
            case 112:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   544
                return "JvmMemPoolThreshdSupport";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   545
90ce3da70b43 Initial load
duke
parents:
diff changeset
   546
            case 111:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   547
                return "JvmMemPoolThreshdCount";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   548
90ce3da70b43 Initial load
duke
parents:
diff changeset
   549
            case 110:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   550
                return "JvmMemPoolThreshold";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   551
90ce3da70b43 Initial load
duke
parents:
diff changeset
   552
            case 5:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   553
                return "JvmMemPoolPeakReset";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   554
90ce3da70b43 Initial load
duke
parents:
diff changeset
   555
            case 4:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   556
                return "JvmMemPoolState";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   557
90ce3da70b43 Initial load
duke
parents:
diff changeset
   558
            case 3:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   559
                return "JvmMemPoolType";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   560
90ce3da70b43 Initial load
duke
parents:
diff changeset
   561
            case 2:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   562
                return "JvmMemPoolName";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   563
90ce3da70b43 Initial load
duke
parents:
diff changeset
   564
            case 23:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   565
                return "JvmMemPoolPeakMaxSize";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   566
90ce3da70b43 Initial load
duke
parents:
diff changeset
   567
            case 1:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   568
                return "JvmMemPoolIndex";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   569
90ce3da70b43 Initial load
duke
parents:
diff changeset
   570
            case 22:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   571
                return "JvmMemPoolPeakCommitted";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   572
90ce3da70b43 Initial load
duke
parents:
diff changeset
   573
            case 21:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   574
                return "JvmMemPoolPeakUsed";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   575
90ce3da70b43 Initial load
duke
parents:
diff changeset
   576
            default:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   577
                break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   578
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   579
        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   580
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   581
90ce3da70b43 Initial load
duke
parents:
diff changeset
   582
    protected JvmMemPoolEntryMBean node;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   583
    protected SnmpStandardObjectServer objectserver = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   584
}