1 /*
   2  * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 package sun.management.snmp.jvminstr;
  26 
  27 // java imports
  28 //
  29 import java.io.Serializable;
  30 
  31 // jmx imports
  32 //
  33 import javax.management.MBeanServer;
  34 import com.sun.jmx.snmp.SnmpOid;
  35 import com.sun.jmx.snmp.SnmpStatusException;
  36 
  37 // jdmk imports
  38 //
  39 import com.sun.jmx.snmp.agent.SnmpMib;
  40 import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
  41 
  42 import sun.management.snmp.jvmmib.JvmMemoryMeta;
  43 import sun.management.snmp.jvmmib.JvmMemManagerTableMeta;
  44 import sun.management.snmp.jvmmib.JvmMemGCTableMeta;
  45 import sun.management.snmp.jvmmib.JvmMemPoolTableMeta;
  46 import sun.management.snmp.jvmmib.JvmMemMgrPoolRelTableMeta;
  47 import sun.management.snmp.util.MibLogger;
  48 
  49 /**
  50  * The class is used for representing SNMP metadata for the "JvmMemory" group.
  51  */
  52 public class JvmMemoryMetaImpl extends JvmMemoryMeta {
  53 
  54     static final long serialVersionUID = -6500448253825893071L;
  55     /**
  56      * Constructor for the metadata associated to "JvmMemory".
  57      */
  58     public JvmMemoryMetaImpl(SnmpMib myMib, SnmpStandardObjectServer objserv) {
  59         super(myMib,objserv);
  60     }
  61 
  62     /**
  63      * Factory method for "JvmMemManagerTable" table metadata class.
  64      *
  65      * You can redefine this method if you need to replace the default
  66      * generated metadata class with your own customized class.
  67      *
  68      * @param tableName Name of the table object ("JvmMemManagerTable")
  69      * @param groupName Name of the group to which this table belong
  70      *        ("JvmMemory")
  71      * @param mib The SnmpMib object in which this table is registered
  72      * @param server MBeanServer for this table entries (may be null)
  73      *
  74      * @return An instance of the metadata class generated for the
  75      *         "JvmMemManagerTable" table (JvmMemManagerTableMeta)
  76      *
  77      **/
  78     protected JvmMemManagerTableMeta createJvmMemManagerTableMetaNode(
  79         String tableName, String groupName, SnmpMib mib, MBeanServer server)  {
  80         return new JvmMemManagerTableMetaImpl(mib, objectserver);
  81     }
  82 
  83 
  84     /**
  85      * Factory method for "JvmMemGCTable" table metadata class.
  86      *
  87      * You can redefine this method if you need to replace the default
  88      * generated metadata class with your own customized class.
  89      *
  90      * @param tableName Name of the table object ("JvmMemGCTable")
  91      * @param groupName Name of the group to which this table belong
  92      *        ("JvmMemory")
  93      * @param mib The SnmpMib object in which this table is registered
  94      * @param server MBeanServer for this table entries (may be null)
  95      *
  96      * @return An instance of the metadata class generated for the
  97      *         "JvmMemGCTable" table (JvmMemGCTableMeta)
  98      *
  99      **/
 100     protected JvmMemGCTableMeta createJvmMemGCTableMetaNode(String tableName,
 101                       String groupName, SnmpMib mib, MBeanServer server)  {
 102         return new JvmMemGCTableMetaImpl(mib, objectserver);
 103     }
 104 
 105 
 106     /**
 107      * Factory method for "JvmMemPoolTable" table metadata class.
 108      *
 109      * You can redefine this method if you need to replace the default
 110      * generated metadata class with your own customized class.
 111      *
 112      * @param tableName Name of the table object ("JvmMemPoolTable")
 113      * @param groupName Name of the group to which this table belong
 114      *        ("JvmMemory")
 115      * @param mib The SnmpMib object in which this table is registered
 116      * @param server MBeanServer for this table entries (may be null)
 117      *
 118      * @return An instance of the metadata class generated for the
 119      *         "JvmMemPoolTable" table (JvmMemPoolTableMeta)
 120      *
 121      **/
 122     protected JvmMemPoolTableMeta
 123         createJvmMemPoolTableMetaNode(String tableName, String groupName,
 124                                       SnmpMib mib, MBeanServer server)  {
 125         return new JvmMemPoolTableMetaImpl(mib, objectserver);
 126     }
 127 
 128     /**
 129      * Factory method for "JvmMemMgrPoolRelTable" table metadata class.
 130      *
 131      * You can redefine this method if you need to replace the default
 132      * generated metadata class with your own customized class.
 133      *
 134      * @param tableName Name of the table object ("JvmMemMgrPoolRelTable")
 135      * @param groupName Name of the group to which this table belong
 136      *        ("JvmMemory")
 137      * @param mib The SnmpMib object in which this table is registered
 138      * @param server MBeanServer for this table entries (may be null)
 139      *
 140      * @return An instance of the metadata class generated for the
 141      *         "JvmMemMgrPoolRelTable" table (JvmMemMgrPoolRelTableMeta)
 142      *
 143      **/
 144     protected JvmMemMgrPoolRelTableMeta
 145         createJvmMemMgrPoolRelTableMetaNode(String tableName,
 146                                             String groupName,
 147                                             SnmpMib mib, MBeanServer server) {
 148         return new JvmMemMgrPoolRelTableMetaImpl(mib, objectserver);
 149     }
 150 
 151 }