feat(jdk8): move files to new folder to avoid resources compiled.

This commit is contained in:
2025-09-07 15:25:52 +08:00
parent 3f0047bf6f
commit 8c35cfb1c0
17415 changed files with 217 additions and 213 deletions

View File

@@ -0,0 +1,82 @@
/*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB.
//
// java imports
//
import java.io.Serializable;
import java.util.Hashtable;
// RI imports
//
import com.sun.jmx.snmp.Enumerated;
/**
* The class is used for representing "JvmClassesVerboseLevel".
*/
public class EnumJvmClassesVerboseLevel extends Enumerated implements Serializable {
static final long serialVersionUID = -620710366914810374L;
protected static Hashtable<Integer, String> intTable =
new Hashtable<>();
protected static Hashtable<String, Integer> stringTable =
new Hashtable<>();
static {
intTable.put(new Integer(2), "verbose");
intTable.put(new Integer(1), "silent");
stringTable.put("verbose", new Integer(2));
stringTable.put("silent", new Integer(1));
}
public EnumJvmClassesVerboseLevel(int valueIndex) throws IllegalArgumentException {
super(valueIndex);
}
public EnumJvmClassesVerboseLevel(Integer valueIndex) throws IllegalArgumentException {
super(valueIndex);
}
public EnumJvmClassesVerboseLevel() throws IllegalArgumentException {
super();
}
public EnumJvmClassesVerboseLevel(String x) throws IllegalArgumentException {
super(x);
}
protected Hashtable<Integer,String> getIntTable() {
return intTable ;
}
protected Hashtable<String,Integer> getStringTable() {
return stringTable ;
}
}

View File

@@ -0,0 +1,82 @@
/*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB.
//
// java imports
//
import java.io.Serializable;
import java.util.Hashtable;
// RI imports
//
import com.sun.jmx.snmp.Enumerated;
/**
* The class is used for representing "JvmJITCompilerTimeMonitoring".
*/
public class EnumJvmJITCompilerTimeMonitoring extends Enumerated implements Serializable {
static final long serialVersionUID = 3953565918146461236L;
protected static Hashtable<Integer, String> intTable =
new Hashtable<>();
protected static Hashtable<String, Integer> stringTable =
new Hashtable<>();
static {
intTable.put(new Integer(2), "supported");
intTable.put(new Integer(1), "unsupported");
stringTable.put("supported", new Integer(2));
stringTable.put("unsupported", new Integer(1));
}
public EnumJvmJITCompilerTimeMonitoring(int valueIndex) throws IllegalArgumentException {
super(valueIndex);
}
public EnumJvmJITCompilerTimeMonitoring(Integer valueIndex) throws IllegalArgumentException {
super(valueIndex);
}
public EnumJvmJITCompilerTimeMonitoring() throws IllegalArgumentException {
super();
}
public EnumJvmJITCompilerTimeMonitoring(String x) throws IllegalArgumentException {
super(x);
}
protected Hashtable<Integer, String> getIntTable() {
return intTable ;
}
protected Hashtable<String, Integer> getStringTable() {
return stringTable ;
}
}

View File

@@ -0,0 +1,83 @@
/*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB.
//
// java imports
//
import java.io.Serializable;
import java.util.Hashtable;
// RI imports
//
import com.sun.jmx.snmp.Enumerated;
/**
* The class is used for representing "JvmMemManagerState".
*/
public class EnumJvmMemManagerState extends Enumerated implements Serializable {
static final long serialVersionUID = 8249515157795166343L;
protected static Hashtable<Integer, String> intTable =
new Hashtable<>();
protected static Hashtable<String, Integer> stringTable =
new Hashtable<>();
static {
intTable.put(new Integer(2), "valid");
intTable.put(new Integer(1), "invalid");
stringTable.put("valid", new Integer(2));
stringTable.put("invalid", new Integer(1));
}
public EnumJvmMemManagerState(int valueIndex) throws IllegalArgumentException {
super(valueIndex);
}
public EnumJvmMemManagerState(Integer valueIndex) throws IllegalArgumentException {
super(valueIndex);
}
public EnumJvmMemManagerState() throws IllegalArgumentException {
super();
}
public EnumJvmMemManagerState(String x) throws IllegalArgumentException {
super(x);
}
protected Hashtable<Integer, String> getIntTable() {
return intTable ;
}
protected Hashtable<String, Integer> getStringTable() {
return stringTable ;
}
}

View File

@@ -0,0 +1,82 @@
/*
* Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB.
//
// java imports
//
import java.io.Serializable;
import java.util.Hashtable;
// RI imports
//
import com.sun.jmx.snmp.Enumerated;
/**
* The class is used for representing "JvmMemPoolCollectThreshdSupport".
*/
public class EnumJvmMemPoolCollectThreshdSupport extends Enumerated implements Serializable {
static final long serialVersionUID = 8610091819732806282L;
protected static Hashtable<Integer, String> intTable =
new Hashtable<>();
protected static Hashtable<String, Integer> stringTable =
new Hashtable<>();
static {
intTable.put(new Integer(2), "supported");
intTable.put(new Integer(1), "unsupported");
stringTable.put("supported", new Integer(2));
stringTable.put("unsupported", new Integer(1));
}
public EnumJvmMemPoolCollectThreshdSupport(int valueIndex) throws IllegalArgumentException {
super(valueIndex);
}
public EnumJvmMemPoolCollectThreshdSupport(Integer valueIndex) throws IllegalArgumentException {
super(valueIndex);
}
public EnumJvmMemPoolCollectThreshdSupport() throws IllegalArgumentException {
super();
}
public EnumJvmMemPoolCollectThreshdSupport(String x) throws IllegalArgumentException {
super(x);
}
protected Hashtable<Integer, String> getIntTable() {
return intTable ;
}
protected Hashtable<String, Integer> getStringTable() {
return stringTable ;
}
}

View File

@@ -0,0 +1,82 @@
/*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB.
//
// java imports
//
import java.io.Serializable;
import java.util.Hashtable;
// RI imports
//
import com.sun.jmx.snmp.Enumerated;
/**
* The class is used for representing "JvmMemPoolState".
*/
public class EnumJvmMemPoolState extends Enumerated implements Serializable {
static final long serialVersionUID = 3038175407527743027L;
protected static Hashtable<Integer, String> intTable =
new Hashtable<>();
protected static Hashtable<String, Integer> stringTable =
new Hashtable<>();
static {
intTable.put(new Integer(2), "valid");
intTable.put(new Integer(1), "invalid");
stringTable.put("valid", new Integer(2));
stringTable.put("invalid", new Integer(1));
}
public EnumJvmMemPoolState(int valueIndex) throws IllegalArgumentException {
super(valueIndex);
}
public EnumJvmMemPoolState(Integer valueIndex) throws IllegalArgumentException {
super(valueIndex);
}
public EnumJvmMemPoolState() throws IllegalArgumentException {
super();
}
public EnumJvmMemPoolState(String x) throws IllegalArgumentException {
super(x);
}
protected Hashtable<Integer,String> getIntTable() {
return intTable ;
}
protected Hashtable<String,Integer> getStringTable() {
return stringTable ;
}
}

View File

@@ -0,0 +1,82 @@
/*
* Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB.
//
// java imports
//
import java.io.Serializable;
import java.util.Hashtable;
// RI imports
//
import com.sun.jmx.snmp.Enumerated;
/**
* The class is used for representing "JvmMemPoolThreshdSupport".
*/
public class EnumJvmMemPoolThreshdSupport extends Enumerated implements Serializable {
static final long serialVersionUID = 7014693561120661029L;
protected static Hashtable<Integer, String> intTable =
new Hashtable<>();
protected static Hashtable<String, Integer> stringTable =
new Hashtable<>();
static {
intTable.put(new Integer(2), "supported");
intTable.put(new Integer(1), "unsupported");
stringTable.put("supported", new Integer(2));
stringTable.put("unsupported", new Integer(1));
}
public EnumJvmMemPoolThreshdSupport(int valueIndex) throws IllegalArgumentException {
super(valueIndex);
}
public EnumJvmMemPoolThreshdSupport(Integer valueIndex) throws IllegalArgumentException {
super(valueIndex);
}
public EnumJvmMemPoolThreshdSupport() throws IllegalArgumentException {
super();
}
public EnumJvmMemPoolThreshdSupport(String x) throws IllegalArgumentException {
super(x);
}
protected Hashtable<Integer,String> getIntTable() {
return intTable ;
}
protected Hashtable<String,Integer> getStringTable() {
return stringTable ;
}
}

View File

@@ -0,0 +1,82 @@
/*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB.
//
// java imports
//
import java.io.Serializable;
import java.util.Hashtable;
// RI imports
//
import com.sun.jmx.snmp.Enumerated;
/**
* The class is used for representing "JvmMemPoolType".
*/
public class EnumJvmMemPoolType extends Enumerated implements Serializable {
static final long serialVersionUID = -7214498472962396555L;
protected static Hashtable<Integer, String> intTable =
new Hashtable<>();
protected static Hashtable<String, Integer> stringTable =
new Hashtable<>();
static {
intTable.put(new Integer(2), "heap");
intTable.put(new Integer(1), "nonheap");
stringTable.put("heap", new Integer(2));
stringTable.put("nonheap", new Integer(1));
}
public EnumJvmMemPoolType(int valueIndex) throws IllegalArgumentException {
super(valueIndex);
}
public EnumJvmMemPoolType(Integer valueIndex) throws IllegalArgumentException {
super(valueIndex);
}
public EnumJvmMemPoolType() throws IllegalArgumentException {
super();
}
public EnumJvmMemPoolType(String x) throws IllegalArgumentException {
super(x);
}
protected Hashtable<Integer,String> getIntTable() {
return intTable ;
}
protected Hashtable<String,Integer> getStringTable() {
return stringTable ;
}
}

View File

@@ -0,0 +1,88 @@
/*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB.
//
// java imports
//
import java.io.Serializable;
import java.util.Hashtable;
// RI imports
//
import com.sun.jmx.snmp.Enumerated;
/**
* The class is used for representing "JvmMemoryGCCall".
*/
public class EnumJvmMemoryGCCall extends Enumerated implements Serializable {
static final long serialVersionUID = -2869147994287351375L;
protected static Hashtable<Integer, String> intTable =
new Hashtable<>();
protected static Hashtable<String, Integer> stringTable =
new Hashtable<>();
static {
intTable.put(new Integer(2), "supported");
intTable.put(new Integer(5), "failed");
intTable.put(new Integer(4), "started");
intTable.put(new Integer(1), "unsupported");
intTable.put(new Integer(3), "start");
stringTable.put("supported", new Integer(2));
stringTable.put("failed", new Integer(5));
stringTable.put("started", new Integer(4));
stringTable.put("unsupported", new Integer(1));
stringTable.put("start", new Integer(3));
}
public EnumJvmMemoryGCCall(int valueIndex) throws IllegalArgumentException {
super(valueIndex);
}
public EnumJvmMemoryGCCall(Integer valueIndex) throws IllegalArgumentException {
super(valueIndex);
}
public EnumJvmMemoryGCCall() throws IllegalArgumentException {
super();
}
public EnumJvmMemoryGCCall(String x) throws IllegalArgumentException {
super(x);
}
protected Hashtable<Integer, String> getIntTable() {
return intTable ;
}
protected Hashtable<String, Integer> getStringTable() {
return stringTable ;
}
}

View File

@@ -0,0 +1,82 @@
/*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB.
//
// java imports
//
import java.io.Serializable;
import java.util.Hashtable;
// RI imports
//
import com.sun.jmx.snmp.Enumerated;
/**
* The class is used for representing "JvmMemoryGCVerboseLevel".
*/
public class EnumJvmMemoryGCVerboseLevel extends Enumerated implements Serializable {
static final long serialVersionUID = 1362427628755978190L;
protected static Hashtable<Integer, String> intTable =
new Hashtable<>();
protected static Hashtable<String, Integer> stringTable =
new Hashtable<>();
static {
intTable.put(new Integer(2), "verbose");
intTable.put(new Integer(1), "silent");
stringTable.put("verbose", new Integer(2));
stringTable.put("silent", new Integer(1));
}
public EnumJvmMemoryGCVerboseLevel(int valueIndex) throws IllegalArgumentException {
super(valueIndex);
}
public EnumJvmMemoryGCVerboseLevel(Integer valueIndex) throws IllegalArgumentException {
super(valueIndex);
}
public EnumJvmMemoryGCVerboseLevel() throws IllegalArgumentException {
super();
}
public EnumJvmMemoryGCVerboseLevel(String x) throws IllegalArgumentException {
super(x);
}
protected Hashtable<Integer,String> getIntTable() {
return intTable ;
}
protected Hashtable<String,Integer> getStringTable() {
return stringTable ;
}
}

View File

@@ -0,0 +1,82 @@
/*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB.
//
// java imports
//
import java.io.Serializable;
import java.util.Hashtable;
// RI imports
//
import com.sun.jmx.snmp.Enumerated;
/**
* The class is used for representing "JvmRTBootClassPathSupport".
*/
public class EnumJvmRTBootClassPathSupport extends Enumerated implements Serializable {
static final long serialVersionUID = -5957542680437939894L;
protected static Hashtable<Integer, String> intTable =
new Hashtable<>();
protected static Hashtable<String, Integer> stringTable =
new Hashtable<>();
static {
intTable.put(new Integer(2), "supported");
intTable.put(new Integer(1), "unsupported");
stringTable.put("supported", new Integer(2));
stringTable.put("unsupported", new Integer(1));
}
public EnumJvmRTBootClassPathSupport(int valueIndex) throws IllegalArgumentException {
super(valueIndex);
}
public EnumJvmRTBootClassPathSupport(Integer valueIndex) throws IllegalArgumentException {
super(valueIndex);
}
public EnumJvmRTBootClassPathSupport() throws IllegalArgumentException {
super();
}
public EnumJvmRTBootClassPathSupport(String x) throws IllegalArgumentException {
super(x);
}
protected Hashtable<Integer, String> getIntTable() {
return intTable ;
}
protected Hashtable<String, Integer> getStringTable() {
return stringTable ;
}
}

View File

@@ -0,0 +1,84 @@
/*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB.
//
// java imports
//
import java.io.Serializable;
import java.util.Hashtable;
// RI imports
//
import com.sun.jmx.snmp.Enumerated;
/**
* The class is used for representing "JvmThreadContentionMonitoring".
*/
public class EnumJvmThreadContentionMonitoring extends Enumerated implements Serializable {
static final long serialVersionUID = -6411827583604137210L;
protected static Hashtable<Integer, String> intTable =
new Hashtable<>();
protected static Hashtable<String, Integer> stringTable =
new Hashtable<>();
static {
intTable.put(new Integer(3), "enabled");
intTable.put(new Integer(4), "disabled");
intTable.put(new Integer(1), "unsupported");
stringTable.put("enabled", new Integer(3));
stringTable.put("disabled", new Integer(4));
stringTable.put("unsupported", new Integer(1));
}
public EnumJvmThreadContentionMonitoring(int valueIndex) throws IllegalArgumentException {
super(valueIndex);
}
public EnumJvmThreadContentionMonitoring(Integer valueIndex) throws IllegalArgumentException {
super(valueIndex);
}
public EnumJvmThreadContentionMonitoring() throws IllegalArgumentException {
super();
}
public EnumJvmThreadContentionMonitoring(String x) throws IllegalArgumentException {
super(x);
}
protected Hashtable<Integer,String> getIntTable() {
return intTable ;
}
protected Hashtable<String,Integer> getStringTable() {
return stringTable ;
}
}

View File

@@ -0,0 +1,84 @@
/*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB.
//
// java imports
//
import java.io.Serializable;
import java.util.Hashtable;
// RI imports
//
import com.sun.jmx.snmp.Enumerated;
/**
* The class is used for representing "JvmThreadCpuTimeMonitoring".
*/
public class EnumJvmThreadCpuTimeMonitoring extends Enumerated implements Serializable {
static final long serialVersionUID = -532837824105215699L;
protected static Hashtable<Integer, String> intTable =
new Hashtable<>();
protected static Hashtable<String, Integer> stringTable =
new Hashtable<>();
static {
intTable.put(new Integer(3), "enabled");
intTable.put(new Integer(4), "disabled");
intTable.put(new Integer(1), "unsupported");
stringTable.put("enabled", new Integer(3));
stringTable.put("disabled", new Integer(4));
stringTable.put("unsupported", new Integer(1));
}
public EnumJvmThreadCpuTimeMonitoring(int valueIndex) throws IllegalArgumentException {
super(valueIndex);
}
public EnumJvmThreadCpuTimeMonitoring(Integer valueIndex) throws IllegalArgumentException {
super(valueIndex);
}
public EnumJvmThreadCpuTimeMonitoring() throws IllegalArgumentException {
super();
}
public EnumJvmThreadCpuTimeMonitoring(String x) throws IllegalArgumentException {
super(x);
}
protected Hashtable<Integer,String> getIntTable() {
return intTable ;
}
protected Hashtable<String,Integer> getStringTable() {
return stringTable ;
}
}

View File

@@ -0,0 +1,687 @@
/*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// java imports
//
import java.io.Serializable;
import java.util.Hashtable;
// jmx imports
//
import javax.management.MBeanServer;
import javax.management.ObjectName;
import javax.management.InstanceAlreadyExistsException;
// jdmk imports
//
import com.sun.jmx.snmp.agent.SnmpMib;
import com.sun.jmx.snmp.agent.SnmpMibNode;
import com.sun.jmx.snmp.agent.SnmpMibTable;
import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
/**
* The class is used for representing "JVM-MANAGEMENT-MIB".
* You can edit the file if you want to modify the behaviour of the MIB.
*/
public abstract class JVM_MANAGEMENT_MIB extends SnmpMib implements Serializable {
static final long serialVersionUID = 6895037919735816732L;
/**
* Default constructor. Initialize the Mib tree.
*/
public JVM_MANAGEMENT_MIB() {
mibName = "JVM_MANAGEMENT_MIB";
}
/**
* Initialization of the MIB with no registration in Java DMK.
*/
public void init() throws IllegalAccessException {
// Allow only one initialization of the MIB.
//
if (isInitialized == true) {
return ;
}
try {
populate(null, null);
} catch(IllegalAccessException x) {
throw x;
} catch(RuntimeException x) {
throw x;
} catch(Exception x) {
throw new Error(x.getMessage());
}
isInitialized = true;
}
/**
* Initialization of the MIB with AUTOMATIC REGISTRATION in Java DMK.
*/
public ObjectName preRegister(MBeanServer server, ObjectName name)
throws Exception {
// Allow only one initialization of the MIB.
//
if (isInitialized == true) {
throw new InstanceAlreadyExistsException();
}
// Initialize MBeanServer information.
//
this.server = server;
populate(server, name);
isInitialized = true;
return name;
}
/**
* Initialization of the MIB with no registration in Java DMK.
*/
public void populate(MBeanServer server, ObjectName name)
throws Exception {
// Allow only one initialization of the MIB.
//
if (isInitialized == true) {
return ;
}
if (objectserver == null)
objectserver = new SnmpStandardObjectServer();
// Initialization of the "JvmOS" group.
// To disable support of this group, redefine the
// "createJvmOSMetaNode()" factory method, and make it return "null"
//
initJvmOS(server);
// Initialization of the "JvmCompilation" group.
// To disable support of this group, redefine the
// "createJvmCompilationMetaNode()" factory method, and make it return "null"
//
initJvmCompilation(server);
// Initialization of the "JvmRuntime" group.
// To disable support of this group, redefine the
// "createJvmRuntimeMetaNode()" factory method, and make it return "null"
//
initJvmRuntime(server);
// Initialization of the "JvmThreading" group.
// To disable support of this group, redefine the
// "createJvmThreadingMetaNode()" factory method, and make it return "null"
//
initJvmThreading(server);
// Initialization of the "JvmMemory" group.
// To disable support of this group, redefine the
// "createJvmMemoryMetaNode()" factory method, and make it return "null"
//
initJvmMemory(server);
// Initialization of the "JvmClassLoading" group.
// To disable support of this group, redefine the
// "createJvmClassLoadingMetaNode()" factory method, and make it return "null"
//
initJvmClassLoading(server);
isInitialized = true;
}
// ------------------------------------------------------------
//
// Initialization of the "JvmOS" group.
//
// ------------------------------------------------------------
/**
* Initialization of the "JvmOS" group.
*
* To disable support of this group, redefine the
* "createJvmOSMetaNode()" factory method, and make it return "null"
*
* @param server MBeanServer for this group (may be null)
*
**/
protected void initJvmOS(MBeanServer server)
throws Exception {
final String oid = getGroupOid("JvmOS", "1.3.6.1.4.1.42.2.145.3.163.1.1.6");
ObjectName objname = null;
if (server != null) {
objname = getGroupObjectName("JvmOS", oid, mibName + ":name=sun.management.snmp.jvmmib.JvmOS");
}
final JvmOSMeta meta = createJvmOSMetaNode("JvmOS", oid, objname, server);
if (meta != null) {
meta.registerTableNodes( this, server );
// Note that when using standard metadata,
// the returned object must implement the "JvmOSMBean"
// interface.
//
final JvmOSMBean group = (JvmOSMBean) createJvmOSMBean("JvmOS", oid, objname, server);
meta.setInstance( group );
registerGroupNode("JvmOS", oid, objname, meta, group, server);
}
}
/**
* Factory method for "JvmOS" group metadata class.
*
* You can redefine this method if you need to replace the default
* generated metadata class with your own customized class.
*
* @param groupName Name of the group ("JvmOS")
* @param groupOid OID of this group
* @param groupObjname ObjectName for this group (may be null)
* @param server MBeanServer for this group (may be null)
*
* @return An instance of the metadata class generated for the
* "JvmOS" group (JvmOSMeta)
*
**/
protected JvmOSMeta createJvmOSMetaNode(String groupName,
String groupOid, ObjectName groupObjname, MBeanServer server) {
return new JvmOSMeta(this, objectserver);
}
/**
* Factory method for "JvmOS" group MBean.
*
* You can redefine this method if you need to replace the default
* generated MBean class with your own customized class.
*
* @param groupName Name of the group ("JvmOS")
* @param groupOid OID of this group
* @param groupObjname ObjectName for this group (may be null)
* @param server MBeanServer for this group (may be null)
*
* @return An instance of the MBean class generated for the
* "JvmOS" group (JvmOS)
*
* Note that when using standard metadata,
* the returned object must implement the "JvmOSMBean"
* interface.
**/
protected abstract Object createJvmOSMBean(String groupName,
String groupOid, ObjectName groupObjname, MBeanServer server);
// ------------------------------------------------------------
//
// Initialization of the "JvmCompilation" group.
//
// ------------------------------------------------------------
/**
* Initialization of the "JvmCompilation" group.
*
* To disable support of this group, redefine the
* "createJvmCompilationMetaNode()" factory method, and make it return "null"
*
* @param server MBeanServer for this group (may be null)
*
**/
protected void initJvmCompilation(MBeanServer server)
throws Exception {
final String oid = getGroupOid("JvmCompilation", "1.3.6.1.4.1.42.2.145.3.163.1.1.5");
ObjectName objname = null;
if (server != null) {
objname = getGroupObjectName("JvmCompilation", oid, mibName + ":name=sun.management.snmp.jvmmib.JvmCompilation");
}
final JvmCompilationMeta meta = createJvmCompilationMetaNode("JvmCompilation", oid, objname, server);
if (meta != null) {
meta.registerTableNodes( this, server );
// Note that when using standard metadata,
// the returned object must implement the "JvmCompilationMBean"
// interface.
//
final JvmCompilationMBean group = (JvmCompilationMBean) createJvmCompilationMBean("JvmCompilation", oid, objname, server);
meta.setInstance( group );
registerGroupNode("JvmCompilation", oid, objname, meta, group, server);
}
}
/**
* Factory method for "JvmCompilation" group metadata class.
*
* You can redefine this method if you need to replace the default
* generated metadata class with your own customized class.
*
* @param groupName Name of the group ("JvmCompilation")
* @param groupOid OID of this group
* @param groupObjname ObjectName for this group (may be null)
* @param server MBeanServer for this group (may be null)
*
* @return An instance of the metadata class generated for the
* "JvmCompilation" group (JvmCompilationMeta)
*
**/
protected JvmCompilationMeta createJvmCompilationMetaNode(String groupName,
String groupOid, ObjectName groupObjname, MBeanServer server) {
return new JvmCompilationMeta(this, objectserver);
}
/**
* Factory method for "JvmCompilation" group MBean.
*
* You can redefine this method if you need to replace the default
* generated MBean class with your own customized class.
*
* @param groupName Name of the group ("JvmCompilation")
* @param groupOid OID of this group
* @param groupObjname ObjectName for this group (may be null)
* @param server MBeanServer for this group (may be null)
*
* @return An instance of the MBean class generated for the
* "JvmCompilation" group (JvmCompilation)
*
* Note that when using standard metadata,
* the returned object must implement the "JvmCompilationMBean"
* interface.
**/
protected abstract Object createJvmCompilationMBean(String groupName,
String groupOid, ObjectName groupObjname, MBeanServer server);
// ------------------------------------------------------------
//
// Initialization of the "JvmRuntime" group.
//
// ------------------------------------------------------------
/**
* Initialization of the "JvmRuntime" group.
*
* To disable support of this group, redefine the
* "createJvmRuntimeMetaNode()" factory method, and make it return "null"
*
* @param server MBeanServer for this group (may be null)
*
**/
protected void initJvmRuntime(MBeanServer server)
throws Exception {
final String oid = getGroupOid("JvmRuntime", "1.3.6.1.4.1.42.2.145.3.163.1.1.4");
ObjectName objname = null;
if (server != null) {
objname = getGroupObjectName("JvmRuntime", oid, mibName + ":name=sun.management.snmp.jvmmib.JvmRuntime");
}
final JvmRuntimeMeta meta = createJvmRuntimeMetaNode("JvmRuntime", oid, objname, server);
if (meta != null) {
meta.registerTableNodes( this, server );
// Note that when using standard metadata,
// the returned object must implement the "JvmRuntimeMBean"
// interface.
//
final JvmRuntimeMBean group = (JvmRuntimeMBean) createJvmRuntimeMBean("JvmRuntime", oid, objname, server);
meta.setInstance( group );
registerGroupNode("JvmRuntime", oid, objname, meta, group, server);
}
}
/**
* Factory method for "JvmRuntime" group metadata class.
*
* You can redefine this method if you need to replace the default
* generated metadata class with your own customized class.
*
* @param groupName Name of the group ("JvmRuntime")
* @param groupOid OID of this group
* @param groupObjname ObjectName for this group (may be null)
* @param server MBeanServer for this group (may be null)
*
* @return An instance of the metadata class generated for the
* "JvmRuntime" group (JvmRuntimeMeta)
*
**/
protected JvmRuntimeMeta createJvmRuntimeMetaNode(String groupName,
String groupOid, ObjectName groupObjname, MBeanServer server) {
return new JvmRuntimeMeta(this, objectserver);
}
/**
* Factory method for "JvmRuntime" group MBean.
*
* You can redefine this method if you need to replace the default
* generated MBean class with your own customized class.
*
* @param groupName Name of the group ("JvmRuntime")
* @param groupOid OID of this group
* @param groupObjname ObjectName for this group (may be null)
* @param server MBeanServer for this group (may be null)
*
* @return An instance of the MBean class generated for the
* "JvmRuntime" group (JvmRuntime)
*
* Note that when using standard metadata,
* the returned object must implement the "JvmRuntimeMBean"
* interface.
**/
protected abstract Object createJvmRuntimeMBean(String groupName,
String groupOid, ObjectName groupObjname, MBeanServer server);
// ------------------------------------------------------------
//
// Initialization of the "JvmThreading" group.
//
// ------------------------------------------------------------
/**
* Initialization of the "JvmThreading" group.
*
* To disable support of this group, redefine the
* "createJvmThreadingMetaNode()" factory method, and make it return "null"
*
* @param server MBeanServer for this group (may be null)
*
**/
protected void initJvmThreading(MBeanServer server)
throws Exception {
final String oid = getGroupOid("JvmThreading", "1.3.6.1.4.1.42.2.145.3.163.1.1.3");
ObjectName objname = null;
if (server != null) {
objname = getGroupObjectName("JvmThreading", oid, mibName + ":name=sun.management.snmp.jvmmib.JvmThreading");
}
final JvmThreadingMeta meta = createJvmThreadingMetaNode("JvmThreading", oid, objname, server);
if (meta != null) {
meta.registerTableNodes( this, server );
// Note that when using standard metadata,
// the returned object must implement the "JvmThreadingMBean"
// interface.
//
final JvmThreadingMBean group = (JvmThreadingMBean) createJvmThreadingMBean("JvmThreading", oid, objname, server);
meta.setInstance( group );
registerGroupNode("JvmThreading", oid, objname, meta, group, server);
}
}
/**
* Factory method for "JvmThreading" group metadata class.
*
* You can redefine this method if you need to replace the default
* generated metadata class with your own customized class.
*
* @param groupName Name of the group ("JvmThreading")
* @param groupOid OID of this group
* @param groupObjname ObjectName for this group (may be null)
* @param server MBeanServer for this group (may be null)
*
* @return An instance of the metadata class generated for the
* "JvmThreading" group (JvmThreadingMeta)
*
**/
protected JvmThreadingMeta createJvmThreadingMetaNode(String groupName,
String groupOid, ObjectName groupObjname, MBeanServer server) {
return new JvmThreadingMeta(this, objectserver);
}
/**
* Factory method for "JvmThreading" group MBean.
*
* You can redefine this method if you need to replace the default
* generated MBean class with your own customized class.
*
* @param groupName Name of the group ("JvmThreading")
* @param groupOid OID of this group
* @param groupObjname ObjectName for this group (may be null)
* @param server MBeanServer for this group (may be null)
*
* @return An instance of the MBean class generated for the
* "JvmThreading" group (JvmThreading)
*
* Note that when using standard metadata,
* the returned object must implement the "JvmThreadingMBean"
* interface.
**/
protected abstract Object createJvmThreadingMBean(String groupName,
String groupOid, ObjectName groupObjname, MBeanServer server);
// ------------------------------------------------------------
//
// Initialization of the "JvmMemory" group.
//
// ------------------------------------------------------------
/**
* Initialization of the "JvmMemory" group.
*
* To disable support of this group, redefine the
* "createJvmMemoryMetaNode()" factory method, and make it return "null"
*
* @param server MBeanServer for this group (may be null)
*
**/
protected void initJvmMemory(MBeanServer server)
throws Exception {
final String oid = getGroupOid("JvmMemory", "1.3.6.1.4.1.42.2.145.3.163.1.1.2");
ObjectName objname = null;
if (server != null) {
objname = getGroupObjectName("JvmMemory", oid, mibName + ":name=sun.management.snmp.jvmmib.JvmMemory");
}
final JvmMemoryMeta meta = createJvmMemoryMetaNode("JvmMemory", oid, objname, server);
if (meta != null) {
meta.registerTableNodes( this, server );
// Note that when using standard metadata,
// the returned object must implement the "JvmMemoryMBean"
// interface.
//
final JvmMemoryMBean group = (JvmMemoryMBean) createJvmMemoryMBean("JvmMemory", oid, objname, server);
meta.setInstance( group );
registerGroupNode("JvmMemory", oid, objname, meta, group, server);
}
}
/**
* Factory method for "JvmMemory" group metadata class.
*
* You can redefine this method if you need to replace the default
* generated metadata class with your own customized class.
*
* @param groupName Name of the group ("JvmMemory")
* @param groupOid OID of this group
* @param groupObjname ObjectName for this group (may be null)
* @param server MBeanServer for this group (may be null)
*
* @return An instance of the metadata class generated for the
* "JvmMemory" group (JvmMemoryMeta)
*
**/
protected JvmMemoryMeta createJvmMemoryMetaNode(String groupName,
String groupOid, ObjectName groupObjname, MBeanServer server) {
return new JvmMemoryMeta(this, objectserver);
}
/**
* Factory method for "JvmMemory" group MBean.
*
* You can redefine this method if you need to replace the default
* generated MBean class with your own customized class.
*
* @param groupName Name of the group ("JvmMemory")
* @param groupOid OID of this group
* @param groupObjname ObjectName for this group (may be null)
* @param server MBeanServer for this group (may be null)
*
* @return An instance of the MBean class generated for the
* "JvmMemory" group (JvmMemory)
*
* Note that when using standard metadata,
* the returned object must implement the "JvmMemoryMBean"
* interface.
**/
protected abstract Object createJvmMemoryMBean(String groupName,
String groupOid, ObjectName groupObjname, MBeanServer server);
// ------------------------------------------------------------
//
// Initialization of the "JvmClassLoading" group.
//
// ------------------------------------------------------------
/**
* Initialization of the "JvmClassLoading" group.
*
* To disable support of this group, redefine the
* "createJvmClassLoadingMetaNode()" factory method, and make it return "null"
*
* @param server MBeanServer for this group (may be null)
*
**/
protected void initJvmClassLoading(MBeanServer server)
throws Exception {
final String oid = getGroupOid("JvmClassLoading", "1.3.6.1.4.1.42.2.145.3.163.1.1.1");
ObjectName objname = null;
if (server != null) {
objname = getGroupObjectName("JvmClassLoading", oid, mibName + ":name=sun.management.snmp.jvmmib.JvmClassLoading");
}
final JvmClassLoadingMeta meta = createJvmClassLoadingMetaNode("JvmClassLoading", oid, objname, server);
if (meta != null) {
meta.registerTableNodes( this, server );
// Note that when using standard metadata,
// the returned object must implement the "JvmClassLoadingMBean"
// interface.
//
final JvmClassLoadingMBean group = (JvmClassLoadingMBean) createJvmClassLoadingMBean("JvmClassLoading", oid, objname, server);
meta.setInstance( group );
registerGroupNode("JvmClassLoading", oid, objname, meta, group, server);
}
}
/**
* Factory method for "JvmClassLoading" group metadata class.
*
* You can redefine this method if you need to replace the default
* generated metadata class with your own customized class.
*
* @param groupName Name of the group ("JvmClassLoading")
* @param groupOid OID of this group
* @param groupObjname ObjectName for this group (may be null)
* @param server MBeanServer for this group (may be null)
*
* @return An instance of the metadata class generated for the
* "JvmClassLoading" group (JvmClassLoadingMeta)
*
**/
protected JvmClassLoadingMeta createJvmClassLoadingMetaNode(String groupName,
String groupOid, ObjectName groupObjname, MBeanServer server) {
return new JvmClassLoadingMeta(this, objectserver);
}
/**
* Factory method for "JvmClassLoading" group MBean.
*
* You can redefine this method if you need to replace the default
* generated MBean class with your own customized class.
*
* @param groupName Name of the group ("JvmClassLoading")
* @param groupOid OID of this group
* @param groupObjname ObjectName for this group (may be null)
* @param server MBeanServer for this group (may be null)
*
* @return An instance of the MBean class generated for the
* "JvmClassLoading" group (JvmClassLoading)
*
* Note that when using standard metadata,
* the returned object must implement the "JvmClassLoadingMBean"
* interface.
**/
protected abstract Object createJvmClassLoadingMBean(String groupName,
String groupOid, ObjectName groupObjname, MBeanServer server);
// ------------------------------------------------------------
//
// Implements the "registerTableMeta" method defined in "SnmpMib".
// See the "SnmpMib" Javadoc API for more details.
//
// ------------------------------------------------------------
public void registerTableMeta( String name, SnmpMibTable meta) {
if (metadatas == null) return;
if (name == null) return;
metadatas.put(name,meta);
}
// ------------------------------------------------------------
//
// Implements the "getRegisteredTableMeta" method defined in "SnmpMib".
// See the "SnmpMib" Javadoc API for more details.
//
// ------------------------------------------------------------
public SnmpMibTable getRegisteredTableMeta( String name ) {
if (metadatas == null) return null;
if (name == null) return null;
return metadatas.get(name);
}
public SnmpStandardObjectServer getStandardObjectServer() {
if (objectserver == null)
objectserver = new SnmpStandardObjectServer();
return objectserver;
}
private boolean isInitialized = false;
protected SnmpStandardObjectServer objectserver;
protected final Hashtable<String, SnmpMibTable> metadatas =
new Hashtable<String, SnmpMibTable>();
}

View File

@@ -0,0 +1,168 @@
/*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB.
//
// java imports
//
import java.io.Serializable;
// jmx imports
//
import com.sun.jmx.snmp.SnmpOidRecord;
// jdmk imports
//
import com.sun.jmx.snmp.SnmpOidTableSupport;
/**
* The class contains metadata definitions for "JVM-MANAGEMENT-MIB".
* Call SnmpOid.setSnmpOidTable(new JVM_MANAGEMENT_MIBOidTable()) to load the metadata in the SnmpOidTable.
*/
public class JVM_MANAGEMENT_MIBOidTable extends SnmpOidTableSupport implements Serializable {
static final long serialVersionUID = -5010870014488732061L;
/**
* Default constructor. Initialize the Mib tree.
*/
public JVM_MANAGEMENT_MIBOidTable() {
super("JVM_MANAGEMENT_MIB");
loadMib(varList);
}
static SnmpOidRecord varList [] = {
new SnmpOidRecord("jvmOSProcessorCount", "1.3.6.1.4.1.42.2.145.3.163.1.1.6.4", "I"),
new SnmpOidRecord("jvmOSVersion", "1.3.6.1.4.1.42.2.145.3.163.1.1.6.3", "S"),
new SnmpOidRecord("jvmOSArch", "1.3.6.1.4.1.42.2.145.3.163.1.1.6.2", "S"),
new SnmpOidRecord("jvmOSName", "1.3.6.1.4.1.42.2.145.3.163.1.1.6.1", "S"),
new SnmpOidRecord("jvmJITCompilerTimeMonitoring", "1.3.6.1.4.1.42.2.145.3.163.1.1.5.3", "I"),
new SnmpOidRecord("jvmJITCompilerTimeMs", "1.3.6.1.4.1.42.2.145.3.163.1.1.5.2", "C64"),
new SnmpOidRecord("jvmJITCompilerName", "1.3.6.1.4.1.42.2.145.3.163.1.1.5.1", "S"),
new SnmpOidRecord("jvmRTLibraryPathTable", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.23", "TA"),
new SnmpOidRecord("jvmRTLibraryPathEntry", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.23.1", "EN"),
new SnmpOidRecord("jvmRTLibraryPathItem", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.23.1.2", "S"),
new SnmpOidRecord("jvmRTLibraryPathIndex", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.23.1.1", "I"),
new SnmpOidRecord("jvmRTClassPathTable", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.22", "TA"),
new SnmpOidRecord("jvmRTClassPathEntry", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.22.1", "EN"),
new SnmpOidRecord("jvmRTClassPathItem", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.22.1.2", "S"),
new SnmpOidRecord("jvmRTClassPathIndex", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.22.1.1", "I"),
new SnmpOidRecord("jvmRTBootClassPathTable", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.21", "TA"),
new SnmpOidRecord("jvmRTBootClassPathEntry", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.21.1", "EN"),
new SnmpOidRecord("jvmRTBootClassPathItem", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.21.1.2", "S"),
new SnmpOidRecord("jvmRTBootClassPathIndex", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.21.1.1", "I"),
new SnmpOidRecord("jvmRTBootClassPathSupport", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.9", "I"),
new SnmpOidRecord("jvmRTInputArgsTable", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.20", "TA"),
new SnmpOidRecord("jvmRTInputArgsEntry", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.20.1", "EN"),
new SnmpOidRecord("jvmRTInputArgsItem", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.20.1.2", "S"),
new SnmpOidRecord("jvmRTInputArgsIndex", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.20.1.1", "I"),
new SnmpOidRecord("jvmRTManagementSpecVersion", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.8", "S"),
new SnmpOidRecord("jvmRTSpecVersion", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.7", "S"),
new SnmpOidRecord("jvmRTSpecVendor", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.6", "S"),
new SnmpOidRecord("jvmRTSpecName", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.5", "S"),
new SnmpOidRecord("jvmRTVMVersion", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.4", "S"),
new SnmpOidRecord("jvmRTVMVendor", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.3", "S"),
new SnmpOidRecord("jvmRTStartTimeMs", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.12", "C64"),
new SnmpOidRecord("jvmRTUptimeMs", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.11", "C64"),
new SnmpOidRecord("jvmRTVMName", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.2", "S"),
new SnmpOidRecord("jvmRTName", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.1", "S"),
new SnmpOidRecord("jvmRTInputArgsCount", "1.3.6.1.4.1.42.2.145.3.163.1.1.4.10", "I"),
new SnmpOidRecord("jvmThreadCpuTimeMonitoring", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.6", "I"),
new SnmpOidRecord("jvmThreadContentionMonitoring", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.5", "I"),
new SnmpOidRecord("jvmThreadTotalStartedCount", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.4", "C64"),
new SnmpOidRecord("jvmThreadPeakCount", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.3", "C"),
new SnmpOidRecord("jvmThreadDaemonCount", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.2", "G"),
new SnmpOidRecord("jvmThreadCount", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.1", "G"),
new SnmpOidRecord("jvmThreadInstanceTable", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.10", "TA"),
new SnmpOidRecord("jvmThreadInstanceEntry", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.10.1", "EN"),
new SnmpOidRecord("jvmThreadInstName", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.10.1.9", "S"),
new SnmpOidRecord("jvmThreadInstCpuTimeNs", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.10.1.8", "C64"),
new SnmpOidRecord("jvmThreadInstWaitTimeMs", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.10.1.7", "C64"),
new SnmpOidRecord("jvmThreadInstWaitCount", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.10.1.6", "C64"),
new SnmpOidRecord("jvmThreadInstBlockTimeMs", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.10.1.5", "C64"),
new SnmpOidRecord("jvmThreadInstBlockCount", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.10.1.4", "C64"),
new SnmpOidRecord("jvmThreadInstState", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.10.1.3", "S"),
new SnmpOidRecord("jvmThreadInstLockOwnerPtr", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.10.1.11", "OI"),
new SnmpOidRecord("jvmThreadInstId", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.10.1.2", "C64"),
new SnmpOidRecord("jvmThreadInstLockName", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.10.1.10", "S"),
new SnmpOidRecord("jvmThreadInstIndex", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.10.1.1", "S"),
new SnmpOidRecord("jvmThreadPeakCountReset", "1.3.6.1.4.1.42.2.145.3.163.1.1.3.7", "C64"),
new SnmpOidRecord("jvmMemMgrPoolRelTable", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.120", "TA"),
new SnmpOidRecord("jvmMemMgrPoolRelEntry", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.120.1", "EN"),
new SnmpOidRecord("jvmMemMgrRelPoolName", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.120.1.3", "S"),
new SnmpOidRecord("jvmMemMgrRelManagerName", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.120.1.2", "S"),
new SnmpOidRecord("jvmMemoryNonHeapMaxSize", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.23", "C64"),
new SnmpOidRecord("jvmMemoryNonHeapCommitted", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.22", "C64"),
new SnmpOidRecord("jvmMemoryNonHeapUsed", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.21", "C64"),
new SnmpOidRecord("jvmMemPoolTable", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110", "TA"),
new SnmpOidRecord("jvmMemPoolEntry", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1", "EN"),
new SnmpOidRecord("jvmMemPoolCollectMaxSize", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.33", "C64"),
new SnmpOidRecord("jvmMemPoolCollectCommitted", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.32", "C64"),
new SnmpOidRecord("jvmMemPoolCollectUsed", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.31", "C64"),
new SnmpOidRecord("jvmMemPoolCollectThreshdSupport", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.133", "I"),
new SnmpOidRecord("jvmMemPoolCollectThreshdCount", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.132", "C64"),
new SnmpOidRecord("jvmMemPoolCollectThreshold", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.131", "C64"),
new SnmpOidRecord("jvmMemPoolMaxSize", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.13", "C64"),
new SnmpOidRecord("jvmMemPoolCommitted", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.12", "C64"),
new SnmpOidRecord("jvmMemPoolUsed", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.11", "C64"),
new SnmpOidRecord("jvmMemPoolInitSize", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.10", "C64"),
new SnmpOidRecord("jvmMemPoolThreshdSupport", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.112", "I"),
new SnmpOidRecord("jvmMemPoolThreshdCount", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.111", "C64"),
new SnmpOidRecord("jvmMemPoolThreshold", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.110", "C64"),
new SnmpOidRecord("jvmMemPoolPeakReset", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.5", "C64"),
new SnmpOidRecord("jvmMemPoolState", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.4", "I"),
new SnmpOidRecord("jvmMemPoolType", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.3", "I"),
new SnmpOidRecord("jvmMemPoolName", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.2", "S"),
new SnmpOidRecord("jvmMemPoolPeakMaxSize", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.23", "C64"),
new SnmpOidRecord("jvmMemPoolIndex", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.1", "I"),
new SnmpOidRecord("jvmMemPoolPeakCommitted", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.22", "C64"),
new SnmpOidRecord("jvmMemPoolPeakUsed", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.21", "C64"),
new SnmpOidRecord("jvmMemoryNonHeapInitSize", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.20", "C64"),
new SnmpOidRecord("jvmMemoryHeapMaxSize", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.13", "C64"),
new SnmpOidRecord("jvmMemoryHeapCommitted", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.12", "C64"),
new SnmpOidRecord("jvmMemoryGCCall", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.3", "I"),
new SnmpOidRecord("jvmMemoryHeapUsed", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.11", "C64"),
new SnmpOidRecord("jvmMemoryGCVerboseLevel", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.2", "I"),
new SnmpOidRecord("jvmMemGCTable", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.101", "TA"),
new SnmpOidRecord("jvmMemGCEntry", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.101.1", "EN"),
new SnmpOidRecord("jvmMemGCTimeMs", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.101.1.3", "C64"),
new SnmpOidRecord("jvmMemGCCount", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.101.1.2", "C64"),
new SnmpOidRecord("jvmMemoryHeapInitSize", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.10", "C64"),
new SnmpOidRecord("jvmMemoryPendingFinalCount", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.1", "G"),
new SnmpOidRecord("jvmMemManagerTable", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.100", "TA"),
new SnmpOidRecord("jvmMemManagerEntry", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.100.1", "EN"),
new SnmpOidRecord("jvmMemManagerState", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.100.1.3", "I"),
new SnmpOidRecord("jvmMemManagerName", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.100.1.2", "S"),
new SnmpOidRecord("jvmMemManagerIndex", "1.3.6.1.4.1.42.2.145.3.163.1.1.2.100.1.1", "I"),
new SnmpOidRecord("jvmClassesVerboseLevel", "1.3.6.1.4.1.42.2.145.3.163.1.1.1.4", "I"),
new SnmpOidRecord("jvmClassesUnloadedCount", "1.3.6.1.4.1.42.2.145.3.163.1.1.1.3", "C64"),
new SnmpOidRecord("jvmClassesTotalLoadedCount", "1.3.6.1.4.1.42.2.145.3.163.1.1.1.2", "C64"),
new SnmpOidRecord("jvmClassesLoadedCount", "1.3.6.1.4.1.42.2.145.3.163.1.1.1.1", "G"),
new SnmpOidRecord("jvmLowMemoryPoolUsageNotif", "1.3.6.1.4.1.42.2.145.3.163.1.2.2.1.0.1", "NT"),
new SnmpOidRecord("jvmLowMemoryPoolCollectNotif", "1.3.6.1.4.1.42.2.145.3.163.1.2.2.1.0.2", "NT") };
}

View File

@@ -0,0 +1,72 @@
/*
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// jmx imports
//
import com.sun.jmx.snmp.SnmpStatusException;
/**
* This interface is used for representing the remote management interface for the "JvmClassLoading" MBean.
*/
public interface JvmClassLoadingMBean {
/**
* Getter for the "JvmClassesVerboseLevel" variable.
*/
public EnumJvmClassesVerboseLevel getJvmClassesVerboseLevel() throws SnmpStatusException;
/**
* Setter for the "JvmClassesVerboseLevel" variable.
*/
public void setJvmClassesVerboseLevel(EnumJvmClassesVerboseLevel x) throws SnmpStatusException;
/**
* Checker for the "JvmClassesVerboseLevel" variable.
*/
public void checkJvmClassesVerboseLevel(EnumJvmClassesVerboseLevel x) throws SnmpStatusException;
/**
* Getter for the "JvmClassesUnloadedCount" variable.
*/
public Long getJvmClassesUnloadedCount() throws SnmpStatusException;
/**
* Getter for the "JvmClassesTotalLoadedCount" variable.
*/
public Long getJvmClassesTotalLoadedCount() throws SnmpStatusException;
/**
* Getter for the "JvmClassesLoadedCount" variable.
*/
public Long getJvmClassesLoadedCount() throws SnmpStatusException;
}

View File

@@ -0,0 +1,329 @@
/*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// java imports
//
import java.io.Serializable;
// jmx imports
//
import javax.management.MBeanServer;
import com.sun.jmx.snmp.SnmpCounter;
import com.sun.jmx.snmp.SnmpCounter64;
import com.sun.jmx.snmp.SnmpGauge;
import com.sun.jmx.snmp.SnmpInt;
import com.sun.jmx.snmp.SnmpUnsignedInt;
import com.sun.jmx.snmp.SnmpIpAddress;
import com.sun.jmx.snmp.SnmpTimeticks;
import com.sun.jmx.snmp.SnmpOpaque;
import com.sun.jmx.snmp.SnmpString;
import com.sun.jmx.snmp.SnmpStringFixed;
import com.sun.jmx.snmp.SnmpOid;
import com.sun.jmx.snmp.SnmpNull;
import com.sun.jmx.snmp.SnmpValue;
import com.sun.jmx.snmp.SnmpVarBind;
import com.sun.jmx.snmp.SnmpStatusException;
// jdmk imports
//
import com.sun.jmx.snmp.agent.SnmpMib;
import com.sun.jmx.snmp.agent.SnmpMibGroup;
import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
import com.sun.jmx.snmp.agent.SnmpStandardMetaServer;
import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
import com.sun.jmx.snmp.agent.SnmpMibTable;
import com.sun.jmx.snmp.EnumRowStatus;
import com.sun.jmx.snmp.SnmpDefinitions;
/**
* The class is used for representing SNMP metadata for the "JvmClassLoading" group.
* The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.1.
*/
public class JvmClassLoadingMeta extends SnmpMibGroup
implements Serializable, SnmpStandardMetaServer {
static final long serialVersionUID = 5722857476941218568L;
/**
* Constructor for the metadata associated to "JvmClassLoading".
*/
public JvmClassLoadingMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
objectserver = objserv;
try {
registerObject(4);
registerObject(3);
registerObject(2);
registerObject(1);
} catch (IllegalAccessException e) {
throw new RuntimeException(e.getMessage());
}
}
/**
* Get the value of a scalar variable
*/
public SnmpValue get(long var, Object data)
throws SnmpStatusException {
switch((int)var) {
case 4:
return new SnmpInt(node.getJvmClassesVerboseLevel());
case 3:
return new SnmpCounter64(node.getJvmClassesUnloadedCount());
case 2:
return new SnmpCounter64(node.getJvmClassesTotalLoadedCount());
case 1:
return new SnmpGauge(node.getJvmClassesLoadedCount());
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
/**
* Set the value of a scalar variable
*/
public SnmpValue set(SnmpValue x, long var, Object data)
throws SnmpStatusException {
switch((int)var) {
case 4:
if (x instanceof SnmpInt) {
try {
node.setJvmClassesVerboseLevel( new EnumJvmClassesVerboseLevel (((SnmpInt)x).toInteger()));
} catch(IllegalArgumentException e) {
throw new SnmpStatusException(SnmpStatusException.snmpRspWrongValue);
}
return new SnmpInt(node.getJvmClassesVerboseLevel());
} else {
throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
}
case 3:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 2:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 1:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
/**
* Check the value of a scalar variable
*/
public void check(SnmpValue x, long var, Object data)
throws SnmpStatusException {
switch((int) var) {
case 4:
if (x instanceof SnmpInt) {
try {
node.checkJvmClassesVerboseLevel( new EnumJvmClassesVerboseLevel (((SnmpInt)x).toInteger()));
} catch(IllegalArgumentException e) {
throw new SnmpStatusException(SnmpStatusException.snmpRspWrongValue);
}
} else {
throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
}
break;
case 3:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 2:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 1:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
default:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
}
/**
* Allow to bind the metadata description to a specific object.
*/
protected void setInstance(JvmClassLoadingMBean var) {
node = var;
}
// ------------------------------------------------------------
//
// Implements the "get" method defined in "SnmpMibGroup".
// See the "SnmpMibGroup" Javadoc API for more details.
//
// ------------------------------------------------------------
public void get(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.get(this,req,depth);
}
// ------------------------------------------------------------
//
// Implements the "set" method defined in "SnmpMibGroup".
// See the "SnmpMibGroup" Javadoc API for more details.
//
// ------------------------------------------------------------
public void set(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.set(this,req,depth);
}
// ------------------------------------------------------------
//
// Implements the "check" method defined in "SnmpMibGroup".
// See the "SnmpMibGroup" Javadoc API for more details.
//
// ------------------------------------------------------------
public void check(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.check(this,req,depth);
}
/**
* Returns true if "arc" identifies a scalar object.
*/
public boolean isVariable(long arc) {
switch((int)arc) {
case 4:
case 3:
case 2:
case 1:
return true;
default:
break;
}
return false;
}
/**
* Returns true if "arc" identifies a readable scalar object.
*/
public boolean isReadable(long arc) {
switch((int)arc) {
case 4:
case 3:
case 2:
case 1:
return true;
default:
break;
}
return false;
}
// ------------------------------------------------------------
//
// Implements the "skipVariable" method defined in "SnmpMibGroup".
// See the "SnmpMibGroup" Javadoc API for more details.
//
// ------------------------------------------------------------
public boolean skipVariable(long var, Object data, int pduVersion) {
switch((int)var) {
case 3:
case 2:
if (pduVersion==SnmpDefinitions.snmpVersionOne) return true;
break;
default:
break;
}
return super.skipVariable(var,data,pduVersion);
}
/**
* Return the name of the attribute corresponding to the SNMP variable identified by "id".
*/
public String getAttributeName(long id)
throws SnmpStatusException {
switch((int)id) {
case 4:
return "JvmClassesVerboseLevel";
case 3:
return "JvmClassesUnloadedCount";
case 2:
return "JvmClassesTotalLoadedCount";
case 1:
return "JvmClassesLoadedCount";
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
/**
* Returns true if "arc" identifies a table object.
*/
public boolean isTable(long arc) {
switch((int)arc) {
default:
break;
}
return false;
}
/**
* Returns the table object identified by "arc".
*/
public SnmpMibTable getTable(long arc) {
return null;
}
/**
* Register the group's SnmpMibTable objects with the meta-data.
*/
public void registerTableNodes(SnmpMib mib, MBeanServer server) {
}
protected JvmClassLoadingMBean node;
protected SnmpStandardObjectServer objectserver = null;
}

View File

@@ -0,0 +1,57 @@
/*
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// jmx imports
//
import com.sun.jmx.snmp.SnmpStatusException;
/**
* This interface is used for representing the remote management interface for the "JvmCompilation" MBean.
*/
public interface JvmCompilationMBean {
/**
* Getter for the "JvmJITCompilerTimeMonitoring" variable.
*/
public EnumJvmJITCompilerTimeMonitoring getJvmJITCompilerTimeMonitoring() throws SnmpStatusException;
/**
* Getter for the "JvmJITCompilerTimeMs" variable.
*/
public Long getJvmJITCompilerTimeMs() throws SnmpStatusException;
/**
* Getter for the "JvmJITCompilerName" variable.
*/
public String getJvmJITCompilerName() throws SnmpStatusException;
}

View File

@@ -0,0 +1,295 @@
/*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// java imports
//
import java.io.Serializable;
// jmx imports
//
import javax.management.MBeanServer;
import com.sun.jmx.snmp.SnmpCounter;
import com.sun.jmx.snmp.SnmpCounter64;
import com.sun.jmx.snmp.SnmpGauge;
import com.sun.jmx.snmp.SnmpInt;
import com.sun.jmx.snmp.SnmpUnsignedInt;
import com.sun.jmx.snmp.SnmpIpAddress;
import com.sun.jmx.snmp.SnmpTimeticks;
import com.sun.jmx.snmp.SnmpOpaque;
import com.sun.jmx.snmp.SnmpString;
import com.sun.jmx.snmp.SnmpStringFixed;
import com.sun.jmx.snmp.SnmpOid;
import com.sun.jmx.snmp.SnmpNull;
import com.sun.jmx.snmp.SnmpValue;
import com.sun.jmx.snmp.SnmpVarBind;
import com.sun.jmx.snmp.SnmpStatusException;
// jdmk imports
//
import com.sun.jmx.snmp.agent.SnmpMib;
import com.sun.jmx.snmp.agent.SnmpMibGroup;
import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
import com.sun.jmx.snmp.agent.SnmpStandardMetaServer;
import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
import com.sun.jmx.snmp.agent.SnmpMibTable;
import com.sun.jmx.snmp.EnumRowStatus;
import com.sun.jmx.snmp.SnmpDefinitions;
/**
* The class is used for representing SNMP metadata for the "JvmCompilation" group.
* The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.5.
*/
public class JvmCompilationMeta extends SnmpMibGroup
implements Serializable, SnmpStandardMetaServer {
static final long serialVersionUID = -95492874115033638L;
/**
* Constructor for the metadata associated to "JvmCompilation".
*/
public JvmCompilationMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
objectserver = objserv;
try {
registerObject(3);
registerObject(2);
registerObject(1);
} catch (IllegalAccessException e) {
throw new RuntimeException(e.getMessage());
}
}
/**
* Get the value of a scalar variable
*/
public SnmpValue get(long var, Object data)
throws SnmpStatusException {
switch((int)var) {
case 3:
return new SnmpInt(node.getJvmJITCompilerTimeMonitoring());
case 2:
return new SnmpCounter64(node.getJvmJITCompilerTimeMs());
case 1:
return new SnmpString(node.getJvmJITCompilerName());
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
/**
* Set the value of a scalar variable
*/
public SnmpValue set(SnmpValue x, long var, Object data)
throws SnmpStatusException {
switch((int)var) {
case 3:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 2:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 1:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
/**
* Check the value of a scalar variable
*/
public void check(SnmpValue x, long var, Object data)
throws SnmpStatusException {
switch((int) var) {
case 3:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 2:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 1:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
default:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
}
/**
* Allow to bind the metadata description to a specific object.
*/
protected void setInstance(JvmCompilationMBean var) {
node = var;
}
// ------------------------------------------------------------
//
// Implements the "get" method defined in "SnmpMibGroup".
// See the "SnmpMibGroup" Javadoc API for more details.
//
// ------------------------------------------------------------
public void get(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.get(this,req,depth);
}
// ------------------------------------------------------------
//
// Implements the "set" method defined in "SnmpMibGroup".
// See the "SnmpMibGroup" Javadoc API for more details.
//
// ------------------------------------------------------------
public void set(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.set(this,req,depth);
}
// ------------------------------------------------------------
//
// Implements the "check" method defined in "SnmpMibGroup".
// See the "SnmpMibGroup" Javadoc API for more details.
//
// ------------------------------------------------------------
public void check(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.check(this,req,depth);
}
/**
* Returns true if "arc" identifies a scalar object.
*/
public boolean isVariable(long arc) {
switch((int)arc) {
case 3:
case 2:
case 1:
return true;
default:
break;
}
return false;
}
/**
* Returns true if "arc" identifies a readable scalar object.
*/
public boolean isReadable(long arc) {
switch((int)arc) {
case 3:
case 2:
case 1:
return true;
default:
break;
}
return false;
}
// ------------------------------------------------------------
//
// Implements the "skipVariable" method defined in "SnmpMibGroup".
// See the "SnmpMibGroup" Javadoc API for more details.
//
// ------------------------------------------------------------
public boolean skipVariable(long var, Object data, int pduVersion) {
switch((int)var) {
case 2:
if (pduVersion==SnmpDefinitions.snmpVersionOne) return true;
break;
default:
break;
}
return super.skipVariable(var,data,pduVersion);
}
/**
* Return the name of the attribute corresponding to the SNMP variable identified by "id".
*/
public String getAttributeName(long id)
throws SnmpStatusException {
switch((int)id) {
case 3:
return "JvmJITCompilerTimeMonitoring";
case 2:
return "JvmJITCompilerTimeMs";
case 1:
return "JvmJITCompilerName";
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
/**
* Returns true if "arc" identifies a table object.
*/
public boolean isTable(long arc) {
switch((int)arc) {
default:
break;
}
return false;
}
/**
* Returns the table object identified by "arc".
*/
public SnmpMibTable getTable(long arc) {
return null;
}
/**
* Register the group's SnmpMibTable objects with the meta-data.
*/
public void registerTableNodes(SnmpMib mib, MBeanServer server) {
}
protected JvmCompilationMBean node;
protected SnmpStandardObjectServer objectserver = null;
}

View File

@@ -0,0 +1,57 @@
/*
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// jmx imports
//
import com.sun.jmx.snmp.SnmpStatusException;
/**
* This interface is used for representing the remote management interface for the "JvmMemGCEntry" MBean.
*/
public interface JvmMemGCEntryMBean {
/**
* Getter for the "JvmMemGCTimeMs" variable.
*/
public Long getJvmMemGCTimeMs() throws SnmpStatusException;
/**
* Getter for the "JvmMemGCCount" variable.
*/
public Long getJvmMemGCCount() throws SnmpStatusException;
/**
* Getter for the "JvmMemManagerIndex" variable.
*/
public Integer getJvmMemManagerIndex() throws SnmpStatusException;
}

View File

@@ -0,0 +1,255 @@
/*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// java imports
//
import java.io.Serializable;
// jmx imports
//
import javax.management.MBeanServer;
import com.sun.jmx.snmp.SnmpCounter;
import com.sun.jmx.snmp.SnmpCounter64;
import com.sun.jmx.snmp.SnmpGauge;
import com.sun.jmx.snmp.SnmpInt;
import com.sun.jmx.snmp.SnmpUnsignedInt;
import com.sun.jmx.snmp.SnmpIpAddress;
import com.sun.jmx.snmp.SnmpTimeticks;
import com.sun.jmx.snmp.SnmpOpaque;
import com.sun.jmx.snmp.SnmpString;
import com.sun.jmx.snmp.SnmpStringFixed;
import com.sun.jmx.snmp.SnmpOid;
import com.sun.jmx.snmp.SnmpNull;
import com.sun.jmx.snmp.SnmpValue;
import com.sun.jmx.snmp.SnmpVarBind;
import com.sun.jmx.snmp.SnmpStatusException;
// jdmk imports
//
import com.sun.jmx.snmp.agent.SnmpMibNode;
import com.sun.jmx.snmp.agent.SnmpMib;
import com.sun.jmx.snmp.agent.SnmpMibEntry;
import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
import com.sun.jmx.snmp.agent.SnmpStandardMetaServer;
import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
import com.sun.jmx.snmp.agent.SnmpMibTable;
import com.sun.jmx.snmp.EnumRowStatus;
import com.sun.jmx.snmp.SnmpDefinitions;
/**
* The class is used for representing SNMP metadata for the "JvmMemGCEntry" group.
* The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.2.101.1.
*/
public class JvmMemGCEntryMeta extends SnmpMibEntry
implements Serializable, SnmpStandardMetaServer {
static final long serialVersionUID = 6082082529298387063L;
/**
* Constructor for the metadata associated to "JvmMemGCEntry".
*/
public JvmMemGCEntryMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
objectserver = objserv;
varList = new int[2];
varList[0] = 3;
varList[1] = 2;
SnmpMibNode.sort(varList);
}
/**
* Get the value of a scalar variable
*/
public SnmpValue get(long var, Object data)
throws SnmpStatusException {
switch((int)var) {
case 3:
return new SnmpCounter64(node.getJvmMemGCTimeMs());
case 2:
return new SnmpCounter64(node.getJvmMemGCCount());
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
/**
* Set the value of a scalar variable
*/
public SnmpValue set(SnmpValue x, long var, Object data)
throws SnmpStatusException {
switch((int)var) {
case 3:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 2:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
/**
* Check the value of a scalar variable
*/
public void check(SnmpValue x, long var, Object data)
throws SnmpStatusException {
switch((int) var) {
case 3:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 2:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
default:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
}
/**
* Allow to bind the metadata description to a specific object.
*/
protected void setInstance(JvmMemGCEntryMBean var) {
node = var;
}
// ------------------------------------------------------------
//
// Implements the "get" method defined in "SnmpMibEntry".
// See the "SnmpMibEntry" Javadoc API for more details.
//
// ------------------------------------------------------------
public void get(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.get(this,req,depth);
}
// ------------------------------------------------------------
//
// Implements the "set" method defined in "SnmpMibEntry".
// See the "SnmpMibEntry" Javadoc API for more details.
//
// ------------------------------------------------------------
public void set(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.set(this,req,depth);
}
// ------------------------------------------------------------
//
// Implements the "check" method defined in "SnmpMibEntry".
// See the "SnmpMibEntry" Javadoc API for more details.
//
// ------------------------------------------------------------
public void check(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.check(this,req,depth);
}
/**
* Returns true if "arc" identifies a scalar object.
*/
public boolean isVariable(long arc) {
switch((int)arc) {
case 3:
case 2:
return true;
default:
break;
}
return false;
}
/**
* Returns true if "arc" identifies a readable scalar object.
*/
public boolean isReadable(long arc) {
switch((int)arc) {
case 3:
case 2:
return true;
default:
break;
}
return false;
}
// ------------------------------------------------------------
//
// Implements the "skipVariable" method defined in "SnmpMibEntry".
// See the "SnmpMibEntry" Javadoc API for more details.
//
// ------------------------------------------------------------
public boolean skipVariable(long var, Object data, int pduVersion) {
switch((int)var) {
case 3:
case 2:
if (pduVersion==SnmpDefinitions.snmpVersionOne) return true;
break;
default:
break;
}
return super.skipVariable(var,data,pduVersion);
}
/**
* Return the name of the attribute corresponding to the SNMP variable identified by "id".
*/
public String getAttributeName(long id)
throws SnmpStatusException {
switch((int)id) {
case 3:
return "JvmMemGCTimeMs";
case 2:
return "JvmMemGCCount";
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
protected JvmMemGCEntryMBean node;
protected SnmpStandardObjectServer objectserver = null;
}

View File

@@ -0,0 +1,265 @@
/*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// java imports
//
import java.io.Serializable;
import java.util.Vector;
// jmx imports
//
import javax.management.MBeanServer;
import javax.management.ObjectName;
import com.sun.jmx.snmp.SnmpCounter;
import com.sun.jmx.snmp.SnmpCounter64;
import com.sun.jmx.snmp.SnmpGauge;
import com.sun.jmx.snmp.SnmpInt;
import com.sun.jmx.snmp.SnmpUnsignedInt;
import com.sun.jmx.snmp.SnmpIpAddress;
import com.sun.jmx.snmp.SnmpTimeticks;
import com.sun.jmx.snmp.SnmpOpaque;
import com.sun.jmx.snmp.SnmpString;
import com.sun.jmx.snmp.SnmpStringFixed;
import com.sun.jmx.snmp.SnmpOid;
import com.sun.jmx.snmp.SnmpNull;
import com.sun.jmx.snmp.SnmpValue;
import com.sun.jmx.snmp.SnmpVarBind;
import com.sun.jmx.snmp.SnmpStatusException;
// jdmk imports
//
import com.sun.jmx.snmp.agent.SnmpIndex;
import com.sun.jmx.snmp.agent.SnmpMib;
import com.sun.jmx.snmp.agent.SnmpMibTable;
import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
/**
* The class is used for implementing the "JvmMemGCTable" group.
* The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.2.101.
*/
public class JvmMemGCTableMeta extends SnmpMibTable implements Serializable {
static final long serialVersionUID = -8843296871149264612L;
/**
* Constructor for the table. Initialize metadata for "JvmMemGCTableMeta".
* The reference on the MBean server is updated so the entries created through an SNMP SET will be AUTOMATICALLY REGISTERED in Java DMK.
*/
public JvmMemGCTableMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
super(myMib);
objectserver = objserv;
}
/**
* Factory method for "JvmMemGCEntry" entry metadata class.
*
* You can redefine this method if you need to replace the default
* generated metadata class with your own customized class.
*
* @param snmpEntryName Name of the SNMP Entry object (conceptual row) ("JvmMemGCEntry")
* @param tableName Name of the table in which the entries are registered ("JvmMemGCTable")
* @param mib The SnmpMib object in which this table is registered
* @param server MBeanServer for this table entries (may be null)
*
* @return An instance of the metadata class generated for the
* "JvmMemGCEntry" conceptual row (JvmMemGCEntryMeta)
*
**/
protected JvmMemGCEntryMeta createJvmMemGCEntryMetaNode(String snmpEntryName, String tableName, SnmpMib mib, MBeanServer server) {
return new JvmMemGCEntryMeta(mib, objectserver);
}
// ------------------------------------------------------------
//
// Implements the "createNewEntry" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public void createNewEntry(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
throws SnmpStatusException {
if (factory != null)
factory.createNewEntry(req, rowOid, depth, this);
else
throw new SnmpStatusException(
SnmpStatusException.snmpRspNoAccess);
}
// ------------------------------------------------------------
//
// Implements the "isRegistrationRequired" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public boolean isRegistrationRequired() {
return false;
}
public void registerEntryNode(SnmpMib mib, MBeanServer server) {
node = createJvmMemGCEntryMetaNode("JvmMemGCEntry", "JvmMemGCTable", mib, server);
}
// ------------------------------------------------------------
//
// Implements the "addEntry" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public synchronized void addEntry(SnmpOid rowOid, ObjectName objname,
Object entry)
throws SnmpStatusException {
if (! (entry instanceof JvmMemGCEntryMBean) )
throw new ClassCastException("Entries for Table \"" +
"JvmMemGCTable" + "\" must implement the \"" +
"JvmMemGCEntryMBean" + "\" interface.");
super.addEntry(rowOid, objname, entry);
}
// ------------------------------------------------------------
//
// Implements the "get" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public void get(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
throws SnmpStatusException {
JvmMemGCEntryMBean entry = (JvmMemGCEntryMBean) getEntry(rowOid);
synchronized (this) {
node.setInstance(entry);
node.get(req,depth);
}
}
// ------------------------------------------------------------
//
// Implements the "set" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public void set(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
throws SnmpStatusException {
if (req.getSize() == 0) return;
JvmMemGCEntryMBean entry = (JvmMemGCEntryMBean) getEntry(rowOid);
synchronized (this) {
node.setInstance(entry);
node.set(req,depth);
}
}
// ------------------------------------------------------------
//
// Implements the "check" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public void check(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
throws SnmpStatusException {
if (req.getSize() == 0) return;
JvmMemGCEntryMBean entry = (JvmMemGCEntryMBean) getEntry(rowOid);
synchronized (this) {
node.setInstance(entry);
node.check(req,depth);
}
}
/**
* check that the given "var" identifies a columnar object.
*/
public void validateVarEntryId( SnmpOid rowOid, long var, Object data )
throws SnmpStatusException {
node.validateVarId(var, data);
}
/**
* Returns true if "var" identifies a readable scalar object.
*/
public boolean isReadableEntryId( SnmpOid rowOid, long var, Object data )
throws SnmpStatusException {
return node.isReadable(var);
}
/**
* Returns the arc of the next columnar object following "var".
*/
public long getNextVarEntryId( SnmpOid rowOid, long var, Object data )
throws SnmpStatusException {
long nextvar = node.getNextVarId(var, data);
while (!isReadableEntryId(rowOid, nextvar, data))
nextvar = node.getNextVarId(nextvar, data);
return nextvar;
}
// ------------------------------------------------------------
//
// Implements the "skipEntryVariable" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public boolean skipEntryVariable( SnmpOid rowOid, long var, Object data, int pduVersion) {
try {
JvmMemGCEntryMBean entry = (JvmMemGCEntryMBean) getEntry(rowOid);
synchronized (this) {
node.setInstance(entry);
return node.skipVariable(var, data, pduVersion);
}
} catch (SnmpStatusException x) {
return false;
}
}
/**
* Reference to the entry metadata.
*/
private JvmMemGCEntryMeta node;
/**
* Reference to the object server.
*/
protected SnmpStandardObjectServer objectserver;
}

View File

@@ -0,0 +1,57 @@
/*
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// jmx imports
//
import com.sun.jmx.snmp.SnmpStatusException;
/**
* This interface is used for representing the remote management interface for the "JvmMemManagerEntry" MBean.
*/
public interface JvmMemManagerEntryMBean {
/**
* Getter for the "JvmMemManagerState" variable.
*/
public EnumJvmMemManagerState getJvmMemManagerState() throws SnmpStatusException;
/**
* Getter for the "JvmMemManagerName" variable.
*/
public String getJvmMemManagerName() throws SnmpStatusException;
/**
* Getter for the "JvmMemManagerIndex" variable.
*/
public Integer getJvmMemManagerIndex() throws SnmpStatusException;
}

View File

@@ -0,0 +1,265 @@
/*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// java imports
//
import java.io.Serializable;
// jmx imports
//
import javax.management.MBeanServer;
import com.sun.jmx.snmp.SnmpCounter;
import com.sun.jmx.snmp.SnmpCounter64;
import com.sun.jmx.snmp.SnmpGauge;
import com.sun.jmx.snmp.SnmpInt;
import com.sun.jmx.snmp.SnmpUnsignedInt;
import com.sun.jmx.snmp.SnmpIpAddress;
import com.sun.jmx.snmp.SnmpTimeticks;
import com.sun.jmx.snmp.SnmpOpaque;
import com.sun.jmx.snmp.SnmpString;
import com.sun.jmx.snmp.SnmpStringFixed;
import com.sun.jmx.snmp.SnmpOid;
import com.sun.jmx.snmp.SnmpNull;
import com.sun.jmx.snmp.SnmpValue;
import com.sun.jmx.snmp.SnmpVarBind;
import com.sun.jmx.snmp.SnmpStatusException;
// jdmk imports
//
import com.sun.jmx.snmp.agent.SnmpMibNode;
import com.sun.jmx.snmp.agent.SnmpMib;
import com.sun.jmx.snmp.agent.SnmpMibEntry;
import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
import com.sun.jmx.snmp.agent.SnmpStandardMetaServer;
import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
import com.sun.jmx.snmp.agent.SnmpMibTable;
import com.sun.jmx.snmp.EnumRowStatus;
import com.sun.jmx.snmp.SnmpDefinitions;
/**
* The class is used for representing SNMP metadata for the "JvmMemManagerEntry" group.
* The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.2.100.1.
*/
public class JvmMemManagerEntryMeta extends SnmpMibEntry
implements Serializable, SnmpStandardMetaServer {
static final long serialVersionUID = 8166956416408970453L;
/**
* Constructor for the metadata associated to "JvmMemManagerEntry".
*/
public JvmMemManagerEntryMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
objectserver = objserv;
varList = new int[2];
varList[0] = 3;
varList[1] = 2;
SnmpMibNode.sort(varList);
}
/**
* Get the value of a scalar variable
*/
public SnmpValue get(long var, Object data)
throws SnmpStatusException {
switch((int)var) {
case 3:
return new SnmpInt(node.getJvmMemManagerState());
case 2:
return new SnmpString(node.getJvmMemManagerName());
case 1:
throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
/**
* Set the value of a scalar variable
*/
public SnmpValue set(SnmpValue x, long var, Object data)
throws SnmpStatusException {
switch((int)var) {
case 3:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 2:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 1:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
/**
* Check the value of a scalar variable
*/
public void check(SnmpValue x, long var, Object data)
throws SnmpStatusException {
switch((int) var) {
case 3:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 2:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 1:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
default:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
}
/**
* Allow to bind the metadata description to a specific object.
*/
protected void setInstance(JvmMemManagerEntryMBean var) {
node = var;
}
// ------------------------------------------------------------
//
// Implements the "get" method defined in "SnmpMibEntry".
// See the "SnmpMibEntry" Javadoc API for more details.
//
// ------------------------------------------------------------
public void get(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.get(this,req,depth);
}
// ------------------------------------------------------------
//
// Implements the "set" method defined in "SnmpMibEntry".
// See the "SnmpMibEntry" Javadoc API for more details.
//
// ------------------------------------------------------------
public void set(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.set(this,req,depth);
}
// ------------------------------------------------------------
//
// Implements the "check" method defined in "SnmpMibEntry".
// See the "SnmpMibEntry" Javadoc API for more details.
//
// ------------------------------------------------------------
public void check(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.check(this,req,depth);
}
/**
* Returns true if "arc" identifies a scalar object.
*/
public boolean isVariable(long arc) {
switch((int)arc) {
case 3:
case 2:
case 1:
return true;
default:
break;
}
return false;
}
/**
* Returns true if "arc" identifies a readable scalar object.
*/
public boolean isReadable(long arc) {
switch((int)arc) {
case 3:
case 2:
return true;
default:
break;
}
return false;
}
// ------------------------------------------------------------
//
// Implements the "skipVariable" method defined in "SnmpMibEntry".
// See the "SnmpMibEntry" Javadoc API for more details.
//
// ------------------------------------------------------------
public boolean skipVariable(long var, Object data, int pduVersion) {
switch((int)var) {
case 1:
return true;
default:
break;
}
return super.skipVariable(var,data,pduVersion);
}
/**
* Return the name of the attribute corresponding to the SNMP variable identified by "id".
*/
public String getAttributeName(long id)
throws SnmpStatusException {
switch((int)id) {
case 3:
return "JvmMemManagerState";
case 2:
return "JvmMemManagerName";
case 1:
return "JvmMemManagerIndex";
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
protected JvmMemManagerEntryMBean node;
protected SnmpStandardObjectServer objectserver = null;
}

View File

@@ -0,0 +1,265 @@
/*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// java imports
//
import java.io.Serializable;
import java.util.Vector;
// jmx imports
//
import javax.management.MBeanServer;
import javax.management.ObjectName;
import com.sun.jmx.snmp.SnmpCounter;
import com.sun.jmx.snmp.SnmpCounter64;
import com.sun.jmx.snmp.SnmpGauge;
import com.sun.jmx.snmp.SnmpInt;
import com.sun.jmx.snmp.SnmpUnsignedInt;
import com.sun.jmx.snmp.SnmpIpAddress;
import com.sun.jmx.snmp.SnmpTimeticks;
import com.sun.jmx.snmp.SnmpOpaque;
import com.sun.jmx.snmp.SnmpString;
import com.sun.jmx.snmp.SnmpStringFixed;
import com.sun.jmx.snmp.SnmpOid;
import com.sun.jmx.snmp.SnmpNull;
import com.sun.jmx.snmp.SnmpValue;
import com.sun.jmx.snmp.SnmpVarBind;
import com.sun.jmx.snmp.SnmpStatusException;
// jdmk imports
//
import com.sun.jmx.snmp.agent.SnmpIndex;
import com.sun.jmx.snmp.agent.SnmpMib;
import com.sun.jmx.snmp.agent.SnmpMibTable;
import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
/**
* The class is used for implementing the "JvmMemManagerTable" group.
* The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.2.100.
*/
public class JvmMemManagerTableMeta extends SnmpMibTable implements Serializable {
static final long serialVersionUID = 5026520607518015233L;
/**
* Constructor for the table. Initialize metadata for "JvmMemManagerTableMeta".
* The reference on the MBean server is updated so the entries created through an SNMP SET will be AUTOMATICALLY REGISTERED in Java DMK.
*/
public JvmMemManagerTableMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
super(myMib);
objectserver = objserv;
}
/**
* Factory method for "JvmMemManagerEntry" entry metadata class.
*
* You can redefine this method if you need to replace the default
* generated metadata class with your own customized class.
*
* @param snmpEntryName Name of the SNMP Entry object (conceptual row) ("JvmMemManagerEntry")
* @param tableName Name of the table in which the entries are registered ("JvmMemManagerTable")
* @param mib The SnmpMib object in which this table is registered
* @param server MBeanServer for this table entries (may be null)
*
* @return An instance of the metadata class generated for the
* "JvmMemManagerEntry" conceptual row (JvmMemManagerEntryMeta)
*
**/
protected JvmMemManagerEntryMeta createJvmMemManagerEntryMetaNode(String snmpEntryName, String tableName, SnmpMib mib, MBeanServer server) {
return new JvmMemManagerEntryMeta(mib, objectserver);
}
// ------------------------------------------------------------
//
// Implements the "createNewEntry" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public void createNewEntry(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
throws SnmpStatusException {
if (factory != null)
factory.createNewEntry(req, rowOid, depth, this);
else
throw new SnmpStatusException(
SnmpStatusException.snmpRspNoAccess);
}
// ------------------------------------------------------------
//
// Implements the "isRegistrationRequired" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public boolean isRegistrationRequired() {
return false;
}
public void registerEntryNode(SnmpMib mib, MBeanServer server) {
node = createJvmMemManagerEntryMetaNode("JvmMemManagerEntry", "JvmMemManagerTable", mib, server);
}
// ------------------------------------------------------------
//
// Implements the "addEntry" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public synchronized void addEntry(SnmpOid rowOid, ObjectName objname,
Object entry)
throws SnmpStatusException {
if (! (entry instanceof JvmMemManagerEntryMBean) )
throw new ClassCastException("Entries for Table \"" +
"JvmMemManagerTable" + "\" must implement the \"" +
"JvmMemManagerEntryMBean" + "\" interface.");
super.addEntry(rowOid, objname, entry);
}
// ------------------------------------------------------------
//
// Implements the "get" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public void get(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
throws SnmpStatusException {
JvmMemManagerEntryMBean entry = (JvmMemManagerEntryMBean) getEntry(rowOid);
synchronized (this) {
node.setInstance(entry);
node.get(req,depth);
}
}
// ------------------------------------------------------------
//
// Implements the "set" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public void set(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
throws SnmpStatusException {
if (req.getSize() == 0) return;
JvmMemManagerEntryMBean entry = (JvmMemManagerEntryMBean) getEntry(rowOid);
synchronized (this) {
node.setInstance(entry);
node.set(req,depth);
}
}
// ------------------------------------------------------------
//
// Implements the "check" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public void check(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
throws SnmpStatusException {
if (req.getSize() == 0) return;
JvmMemManagerEntryMBean entry = (JvmMemManagerEntryMBean) getEntry(rowOid);
synchronized (this) {
node.setInstance(entry);
node.check(req,depth);
}
}
/**
* check that the given "var" identifies a columnar object.
*/
public void validateVarEntryId( SnmpOid rowOid, long var, Object data )
throws SnmpStatusException {
node.validateVarId(var, data);
}
/**
* Returns true if "var" identifies a readable scalar object.
*/
public boolean isReadableEntryId( SnmpOid rowOid, long var, Object data )
throws SnmpStatusException {
return node.isReadable(var);
}
/**
* Returns the arc of the next columnar object following "var".
*/
public long getNextVarEntryId( SnmpOid rowOid, long var, Object data )
throws SnmpStatusException {
long nextvar = node.getNextVarId(var, data);
while (!isReadableEntryId(rowOid, nextvar, data))
nextvar = node.getNextVarId(nextvar, data);
return nextvar;
}
// ------------------------------------------------------------
//
// Implements the "skipEntryVariable" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public boolean skipEntryVariable( SnmpOid rowOid, long var, Object data, int pduVersion) {
try {
JvmMemManagerEntryMBean entry = (JvmMemManagerEntryMBean) getEntry(rowOid);
synchronized (this) {
node.setInstance(entry);
return node.skipVariable(var, data, pduVersion);
}
} catch (SnmpStatusException x) {
return false;
}
}
/**
* Reference to the entry metadata.
*/
private JvmMemManagerEntryMeta node;
/**
* Reference to the object server.
*/
protected SnmpStandardObjectServer objectserver;
}

View File

@@ -0,0 +1,62 @@
/*
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// jmx imports
//
import com.sun.jmx.snmp.SnmpStatusException;
/**
* This interface is used for representing the remote management interface for the "JvmMemMgrPoolRelEntry" MBean.
*/
public interface JvmMemMgrPoolRelEntryMBean {
/**
* Getter for the "JvmMemMgrRelPoolName" variable.
*/
public String getJvmMemMgrRelPoolName() throws SnmpStatusException;
/**
* Getter for the "JvmMemMgrRelManagerName" variable.
*/
public String getJvmMemMgrRelManagerName() throws SnmpStatusException;
/**
* Getter for the "JvmMemManagerIndex" variable.
*/
public Integer getJvmMemManagerIndex() throws SnmpStatusException;
/**
* Getter for the "JvmMemPoolIndex" variable.
*/
public Integer getJvmMemPoolIndex() throws SnmpStatusException;
}

View File

@@ -0,0 +1,247 @@
/*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// java imports
//
import java.io.Serializable;
// jmx imports
//
import javax.management.MBeanServer;
import com.sun.jmx.snmp.SnmpCounter;
import com.sun.jmx.snmp.SnmpCounter64;
import com.sun.jmx.snmp.SnmpGauge;
import com.sun.jmx.snmp.SnmpInt;
import com.sun.jmx.snmp.SnmpUnsignedInt;
import com.sun.jmx.snmp.SnmpIpAddress;
import com.sun.jmx.snmp.SnmpTimeticks;
import com.sun.jmx.snmp.SnmpOpaque;
import com.sun.jmx.snmp.SnmpString;
import com.sun.jmx.snmp.SnmpStringFixed;
import com.sun.jmx.snmp.SnmpOid;
import com.sun.jmx.snmp.SnmpNull;
import com.sun.jmx.snmp.SnmpValue;
import com.sun.jmx.snmp.SnmpVarBind;
import com.sun.jmx.snmp.SnmpStatusException;
// jdmk imports
//
import com.sun.jmx.snmp.agent.SnmpMibNode;
import com.sun.jmx.snmp.agent.SnmpMib;
import com.sun.jmx.snmp.agent.SnmpMibEntry;
import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
import com.sun.jmx.snmp.agent.SnmpStandardMetaServer;
import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
import com.sun.jmx.snmp.agent.SnmpMibTable;
import com.sun.jmx.snmp.EnumRowStatus;
import com.sun.jmx.snmp.SnmpDefinitions;
/**
* The class is used for representing SNMP metadata for the "JvmMemMgrPoolRelEntry" group.
* The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.2.120.1.
*/
public class JvmMemMgrPoolRelEntryMeta extends SnmpMibEntry
implements Serializable, SnmpStandardMetaServer {
static final long serialVersionUID = 7414270971113459798L;
/**
* Constructor for the metadata associated to "JvmMemMgrPoolRelEntry".
*/
public JvmMemMgrPoolRelEntryMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
objectserver = objserv;
varList = new int[2];
varList[0] = 3;
varList[1] = 2;
SnmpMibNode.sort(varList);
}
/**
* Get the value of a scalar variable
*/
public SnmpValue get(long var, Object data)
throws SnmpStatusException {
switch((int)var) {
case 3:
return new SnmpString(node.getJvmMemMgrRelPoolName());
case 2:
return new SnmpString(node.getJvmMemMgrRelManagerName());
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
/**
* Set the value of a scalar variable
*/
public SnmpValue set(SnmpValue x, long var, Object data)
throws SnmpStatusException {
switch((int)var) {
case 3:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 2:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
/**
* Check the value of a scalar variable
*/
public void check(SnmpValue x, long var, Object data)
throws SnmpStatusException {
switch((int) var) {
case 3:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 2:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
default:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
}
/**
* Allow to bind the metadata description to a specific object.
*/
protected void setInstance(JvmMemMgrPoolRelEntryMBean var) {
node = var;
}
// ------------------------------------------------------------
//
// Implements the "get" method defined in "SnmpMibEntry".
// See the "SnmpMibEntry" Javadoc API for more details.
//
// ------------------------------------------------------------
public void get(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.get(this,req,depth);
}
// ------------------------------------------------------------
//
// Implements the "set" method defined in "SnmpMibEntry".
// See the "SnmpMibEntry" Javadoc API for more details.
//
// ------------------------------------------------------------
public void set(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.set(this,req,depth);
}
// ------------------------------------------------------------
//
// Implements the "check" method defined in "SnmpMibEntry".
// See the "SnmpMibEntry" Javadoc API for more details.
//
// ------------------------------------------------------------
public void check(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.check(this,req,depth);
}
/**
* Returns true if "arc" identifies a scalar object.
*/
public boolean isVariable(long arc) {
switch((int)arc) {
case 3:
case 2:
return true;
default:
break;
}
return false;
}
/**
* Returns true if "arc" identifies a readable scalar object.
*/
public boolean isReadable(long arc) {
switch((int)arc) {
case 3:
case 2:
return true;
default:
break;
}
return false;
}
// ------------------------------------------------------------
//
// Implements the "skipVariable" method defined in "SnmpMibEntry".
// See the "SnmpMibEntry" Javadoc API for more details.
//
// ------------------------------------------------------------
public boolean skipVariable(long var, Object data, int pduVersion) {
return super.skipVariable(var,data,pduVersion);
}
/**
* Return the name of the attribute corresponding to the SNMP variable identified by "id".
*/
public String getAttributeName(long id)
throws SnmpStatusException {
switch((int)id) {
case 3:
return "JvmMemMgrRelPoolName";
case 2:
return "JvmMemMgrRelManagerName";
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
protected JvmMemMgrPoolRelEntryMBean node;
protected SnmpStandardObjectServer objectserver = null;
}

View File

@@ -0,0 +1,265 @@
/*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// java imports
//
import java.io.Serializable;
import java.util.Vector;
// jmx imports
//
import javax.management.MBeanServer;
import javax.management.ObjectName;
import com.sun.jmx.snmp.SnmpCounter;
import com.sun.jmx.snmp.SnmpCounter64;
import com.sun.jmx.snmp.SnmpGauge;
import com.sun.jmx.snmp.SnmpInt;
import com.sun.jmx.snmp.SnmpUnsignedInt;
import com.sun.jmx.snmp.SnmpIpAddress;
import com.sun.jmx.snmp.SnmpTimeticks;
import com.sun.jmx.snmp.SnmpOpaque;
import com.sun.jmx.snmp.SnmpString;
import com.sun.jmx.snmp.SnmpStringFixed;
import com.sun.jmx.snmp.SnmpOid;
import com.sun.jmx.snmp.SnmpNull;
import com.sun.jmx.snmp.SnmpValue;
import com.sun.jmx.snmp.SnmpVarBind;
import com.sun.jmx.snmp.SnmpStatusException;
// jdmk imports
//
import com.sun.jmx.snmp.agent.SnmpIndex;
import com.sun.jmx.snmp.agent.SnmpMib;
import com.sun.jmx.snmp.agent.SnmpMibTable;
import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
/**
* The class is used for implementing the "JvmMemMgrPoolRelTable" group.
* The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.2.120.
*/
public class JvmMemMgrPoolRelTableMeta extends SnmpMibTable implements Serializable {
static final long serialVersionUID = -310733366542788998L;
/**
* Constructor for the table. Initialize metadata for "JvmMemMgrPoolRelTableMeta".
* The reference on the MBean server is updated so the entries created through an SNMP SET will be AUTOMATICALLY REGISTERED in Java DMK.
*/
public JvmMemMgrPoolRelTableMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
super(myMib);
objectserver = objserv;
}
/**
* Factory method for "JvmMemMgrPoolRelEntry" entry metadata class.
*
* You can redefine this method if you need to replace the default
* generated metadata class with your own customized class.
*
* @param snmpEntryName Name of the SNMP Entry object (conceptual row) ("JvmMemMgrPoolRelEntry")
* @param tableName Name of the table in which the entries are registered ("JvmMemMgrPoolRelTable")
* @param mib The SnmpMib object in which this table is registered
* @param server MBeanServer for this table entries (may be null)
*
* @return An instance of the metadata class generated for the
* "JvmMemMgrPoolRelEntry" conceptual row (JvmMemMgrPoolRelEntryMeta)
*
**/
protected JvmMemMgrPoolRelEntryMeta createJvmMemMgrPoolRelEntryMetaNode(String snmpEntryName, String tableName, SnmpMib mib, MBeanServer server) {
return new JvmMemMgrPoolRelEntryMeta(mib, objectserver);
}
// ------------------------------------------------------------
//
// Implements the "createNewEntry" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public void createNewEntry(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
throws SnmpStatusException {
if (factory != null)
factory.createNewEntry(req, rowOid, depth, this);
else
throw new SnmpStatusException(
SnmpStatusException.snmpRspNoAccess);
}
// ------------------------------------------------------------
//
// Implements the "isRegistrationRequired" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public boolean isRegistrationRequired() {
return false;
}
public void registerEntryNode(SnmpMib mib, MBeanServer server) {
node = createJvmMemMgrPoolRelEntryMetaNode("JvmMemMgrPoolRelEntry", "JvmMemMgrPoolRelTable", mib, server);
}
// ------------------------------------------------------------
//
// Implements the "addEntry" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public synchronized void addEntry(SnmpOid rowOid, ObjectName objname,
Object entry)
throws SnmpStatusException {
if (! (entry instanceof JvmMemMgrPoolRelEntryMBean) )
throw new ClassCastException("Entries for Table \"" +
"JvmMemMgrPoolRelTable" + "\" must implement the \"" +
"JvmMemMgrPoolRelEntryMBean" + "\" interface.");
super.addEntry(rowOid, objname, entry);
}
// ------------------------------------------------------------
//
// Implements the "get" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public void get(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
throws SnmpStatusException {
JvmMemMgrPoolRelEntryMBean entry = (JvmMemMgrPoolRelEntryMBean) getEntry(rowOid);
synchronized (this) {
node.setInstance(entry);
node.get(req,depth);
}
}
// ------------------------------------------------------------
//
// Implements the "set" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public void set(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
throws SnmpStatusException {
if (req.getSize() == 0) return;
JvmMemMgrPoolRelEntryMBean entry = (JvmMemMgrPoolRelEntryMBean) getEntry(rowOid);
synchronized (this) {
node.setInstance(entry);
node.set(req,depth);
}
}
// ------------------------------------------------------------
//
// Implements the "check" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public void check(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
throws SnmpStatusException {
if (req.getSize() == 0) return;
JvmMemMgrPoolRelEntryMBean entry = (JvmMemMgrPoolRelEntryMBean) getEntry(rowOid);
synchronized (this) {
node.setInstance(entry);
node.check(req,depth);
}
}
/**
* check that the given "var" identifies a columnar object.
*/
public void validateVarEntryId( SnmpOid rowOid, long var, Object data )
throws SnmpStatusException {
node.validateVarId(var, data);
}
/**
* Returns true if "var" identifies a readable scalar object.
*/
public boolean isReadableEntryId( SnmpOid rowOid, long var, Object data )
throws SnmpStatusException {
return node.isReadable(var);
}
/**
* Returns the arc of the next columnar object following "var".
*/
public long getNextVarEntryId( SnmpOid rowOid, long var, Object data )
throws SnmpStatusException {
long nextvar = node.getNextVarId(var, data);
while (!isReadableEntryId(rowOid, nextvar, data))
nextvar = node.getNextVarId(nextvar, data);
return nextvar;
}
// ------------------------------------------------------------
//
// Implements the "skipEntryVariable" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public boolean skipEntryVariable( SnmpOid rowOid, long var, Object data, int pduVersion) {
try {
JvmMemMgrPoolRelEntryMBean entry = (JvmMemMgrPoolRelEntryMBean) getEntry(rowOid);
synchronized (this) {
node.setInstance(entry);
return node.skipVariable(var, data, pduVersion);
}
} catch (SnmpStatusException x) {
return false;
}
}
/**
* Reference to the entry metadata.
*/
private JvmMemMgrPoolRelEntryMeta node;
/**
* Reference to the object server.
*/
protected SnmpStandardObjectServer objectserver;
}

View File

@@ -0,0 +1,177 @@
/*
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// jmx imports
//
import com.sun.jmx.snmp.SnmpStatusException;
/**
* This interface is used for representing the remote management interface for the "JvmMemPoolEntry" MBean.
*/
public interface JvmMemPoolEntryMBean {
/**
* Getter for the "JvmMemPoolCollectMaxSize" variable.
*/
public Long getJvmMemPoolCollectMaxSize() throws SnmpStatusException;
/**
* Getter for the "JvmMemPoolCollectCommitted" variable.
*/
public Long getJvmMemPoolCollectCommitted() throws SnmpStatusException;
/**
* Getter for the "JvmMemPoolCollectUsed" variable.
*/
public Long getJvmMemPoolCollectUsed() throws SnmpStatusException;
/**
* Getter for the "JvmMemPoolCollectThreshdSupport" variable.
*/
public EnumJvmMemPoolCollectThreshdSupport getJvmMemPoolCollectThreshdSupport() throws SnmpStatusException;
/**
* Getter for the "JvmMemPoolCollectThreshdCount" variable.
*/
public Long getJvmMemPoolCollectThreshdCount() throws SnmpStatusException;
/**
* Getter for the "JvmMemPoolCollectThreshold" variable.
*/
public Long getJvmMemPoolCollectThreshold() throws SnmpStatusException;
/**
* Setter for the "JvmMemPoolCollectThreshold" variable.
*/
public void setJvmMemPoolCollectThreshold(Long x) throws SnmpStatusException;
/**
* Checker for the "JvmMemPoolCollectThreshold" variable.
*/
public void checkJvmMemPoolCollectThreshold(Long x) throws SnmpStatusException;
/**
* Getter for the "JvmMemPoolMaxSize" variable.
*/
public Long getJvmMemPoolMaxSize() throws SnmpStatusException;
/**
* Getter for the "JvmMemPoolCommitted" variable.
*/
public Long getJvmMemPoolCommitted() throws SnmpStatusException;
/**
* Getter for the "JvmMemPoolUsed" variable.
*/
public Long getJvmMemPoolUsed() throws SnmpStatusException;
/**
* Getter for the "JvmMemPoolInitSize" variable.
*/
public Long getJvmMemPoolInitSize() throws SnmpStatusException;
/**
* Getter for the "JvmMemPoolThreshdSupport" variable.
*/
public EnumJvmMemPoolThreshdSupport getJvmMemPoolThreshdSupport() throws SnmpStatusException;
/**
* Getter for the "JvmMemPoolThreshdCount" variable.
*/
public Long getJvmMemPoolThreshdCount() throws SnmpStatusException;
/**
* Getter for the "JvmMemPoolThreshold" variable.
*/
public Long getJvmMemPoolThreshold() throws SnmpStatusException;
/**
* Setter for the "JvmMemPoolThreshold" variable.
*/
public void setJvmMemPoolThreshold(Long x) throws SnmpStatusException;
/**
* Checker for the "JvmMemPoolThreshold" variable.
*/
public void checkJvmMemPoolThreshold(Long x) throws SnmpStatusException;
/**
* Getter for the "JvmMemPoolPeakReset" variable.
*/
public Long getJvmMemPoolPeakReset() throws SnmpStatusException;
/**
* Setter for the "JvmMemPoolPeakReset" variable.
*/
public void setJvmMemPoolPeakReset(Long x) throws SnmpStatusException;
/**
* Checker for the "JvmMemPoolPeakReset" variable.
*/
public void checkJvmMemPoolPeakReset(Long x) throws SnmpStatusException;
/**
* Getter for the "JvmMemPoolState" variable.
*/
public EnumJvmMemPoolState getJvmMemPoolState() throws SnmpStatusException;
/**
* Getter for the "JvmMemPoolType" variable.
*/
public EnumJvmMemPoolType getJvmMemPoolType() throws SnmpStatusException;
/**
* Getter for the "JvmMemPoolName" variable.
*/
public String getJvmMemPoolName() throws SnmpStatusException;
/**
* Getter for the "JvmMemPoolPeakMaxSize" variable.
*/
public Long getJvmMemPoolPeakMaxSize() throws SnmpStatusException;
/**
* Getter for the "JvmMemPoolIndex" variable.
*/
public Integer getJvmMemPoolIndex() throws SnmpStatusException;
/**
* Getter for the "JvmMemPoolPeakCommitted" variable.
*/
public Long getJvmMemPoolPeakCommitted() throws SnmpStatusException;
/**
* Getter for the "JvmMemPoolPeakUsed" variable.
*/
public Long getJvmMemPoolPeakUsed() throws SnmpStatusException;
}

View File

@@ -0,0 +1,584 @@
/*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// java imports
//
import java.io.Serializable;
// jmx imports
//
import javax.management.MBeanServer;
import com.sun.jmx.snmp.SnmpCounter;
import com.sun.jmx.snmp.SnmpCounter64;
import com.sun.jmx.snmp.SnmpGauge;
import com.sun.jmx.snmp.SnmpInt;
import com.sun.jmx.snmp.SnmpUnsignedInt;
import com.sun.jmx.snmp.SnmpIpAddress;
import com.sun.jmx.snmp.SnmpTimeticks;
import com.sun.jmx.snmp.SnmpOpaque;
import com.sun.jmx.snmp.SnmpString;
import com.sun.jmx.snmp.SnmpStringFixed;
import com.sun.jmx.snmp.SnmpOid;
import com.sun.jmx.snmp.SnmpNull;
import com.sun.jmx.snmp.SnmpValue;
import com.sun.jmx.snmp.SnmpVarBind;
import com.sun.jmx.snmp.SnmpStatusException;
// jdmk imports
//
import com.sun.jmx.snmp.agent.SnmpMibNode;
import com.sun.jmx.snmp.agent.SnmpMib;
import com.sun.jmx.snmp.agent.SnmpMibEntry;
import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
import com.sun.jmx.snmp.agent.SnmpStandardMetaServer;
import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
import com.sun.jmx.snmp.agent.SnmpMibTable;
import com.sun.jmx.snmp.EnumRowStatus;
import com.sun.jmx.snmp.SnmpDefinitions;
/**
* The class is used for representing SNMP metadata for the "JvmMemPoolEntry" group.
* The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.
*/
public class JvmMemPoolEntryMeta extends SnmpMibEntry
implements Serializable, SnmpStandardMetaServer {
static final long serialVersionUID = 7220682779249102830L;
/**
* Constructor for the metadata associated to "JvmMemPoolEntry".
*/
public JvmMemPoolEntryMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
objectserver = objserv;
varList = new int[20];
varList[0] = 33;
varList[1] = 32;
varList[2] = 31;
varList[3] = 133;
varList[4] = 132;
varList[5] = 131;
varList[6] = 13;
varList[7] = 12;
varList[8] = 11;
varList[9] = 10;
varList[10] = 112;
varList[11] = 111;
varList[12] = 110;
varList[13] = 5;
varList[14] = 4;
varList[15] = 3;
varList[16] = 2;
varList[17] = 23;
varList[18] = 22;
varList[19] = 21;
SnmpMibNode.sort(varList);
}
/**
* Get the value of a scalar variable
*/
public SnmpValue get(long var, Object data)
throws SnmpStatusException {
switch((int)var) {
case 33:
return new SnmpCounter64(node.getJvmMemPoolCollectMaxSize());
case 32:
return new SnmpCounter64(node.getJvmMemPoolCollectCommitted());
case 31:
return new SnmpCounter64(node.getJvmMemPoolCollectUsed());
case 133:
return new SnmpInt(node.getJvmMemPoolCollectThreshdSupport());
case 132:
return new SnmpCounter64(node.getJvmMemPoolCollectThreshdCount());
case 131:
return new SnmpCounter64(node.getJvmMemPoolCollectThreshold());
case 13:
return new SnmpCounter64(node.getJvmMemPoolMaxSize());
case 12:
return new SnmpCounter64(node.getJvmMemPoolCommitted());
case 11:
return new SnmpCounter64(node.getJvmMemPoolUsed());
case 10:
return new SnmpCounter64(node.getJvmMemPoolInitSize());
case 112:
return new SnmpInt(node.getJvmMemPoolThreshdSupport());
case 111:
return new SnmpCounter64(node.getJvmMemPoolThreshdCount());
case 110:
return new SnmpCounter64(node.getJvmMemPoolThreshold());
case 5:
return new SnmpCounter64(node.getJvmMemPoolPeakReset());
case 4:
return new SnmpInt(node.getJvmMemPoolState());
case 3:
return new SnmpInt(node.getJvmMemPoolType());
case 2:
return new SnmpString(node.getJvmMemPoolName());
case 23:
return new SnmpCounter64(node.getJvmMemPoolPeakMaxSize());
case 1:
throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
case 22:
return new SnmpCounter64(node.getJvmMemPoolPeakCommitted());
case 21:
return new SnmpCounter64(node.getJvmMemPoolPeakUsed());
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
/**
* Set the value of a scalar variable
*/
public SnmpValue set(SnmpValue x, long var, Object data)
throws SnmpStatusException {
switch((int)var) {
case 33:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 32:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 31:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 133:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 132:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 131:
if (x instanceof SnmpCounter64) {
node.setJvmMemPoolCollectThreshold(((SnmpCounter64)x).toLong());
return new SnmpCounter64(node.getJvmMemPoolCollectThreshold());
} else {
throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
}
case 13:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 12:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 11:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 10:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 112:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 111:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 110:
if (x instanceof SnmpCounter64) {
node.setJvmMemPoolThreshold(((SnmpCounter64)x).toLong());
return new SnmpCounter64(node.getJvmMemPoolThreshold());
} else {
throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
}
case 5:
if (x instanceof SnmpCounter64) {
node.setJvmMemPoolPeakReset(((SnmpCounter64)x).toLong());
return new SnmpCounter64(node.getJvmMemPoolPeakReset());
} else {
throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
}
case 4:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 3:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 2:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 23:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 1:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 22:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 21:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
/**
* Check the value of a scalar variable
*/
public void check(SnmpValue x, long var, Object data)
throws SnmpStatusException {
switch((int) var) {
case 33:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 32:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 31:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 133:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 132:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 131:
if (x instanceof SnmpCounter64) {
node.checkJvmMemPoolCollectThreshold(((SnmpCounter64)x).toLong());
} else {
throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
}
break;
case 13:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 12:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 11:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 10:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 112:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 111:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 110:
if (x instanceof SnmpCounter64) {
node.checkJvmMemPoolThreshold(((SnmpCounter64)x).toLong());
} else {
throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
}
break;
case 5:
if (x instanceof SnmpCounter64) {
node.checkJvmMemPoolPeakReset(((SnmpCounter64)x).toLong());
} else {
throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
}
break;
case 4:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 3:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 2:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 23:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 1:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 22:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 21:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
default:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
}
/**
* Allow to bind the metadata description to a specific object.
*/
protected void setInstance(JvmMemPoolEntryMBean var) {
node = var;
}
// ------------------------------------------------------------
//
// Implements the "get" method defined in "SnmpMibEntry".
// See the "SnmpMibEntry" Javadoc API for more details.
//
// ------------------------------------------------------------
public void get(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.get(this,req,depth);
}
// ------------------------------------------------------------
//
// Implements the "set" method defined in "SnmpMibEntry".
// See the "SnmpMibEntry" Javadoc API for more details.
//
// ------------------------------------------------------------
public void set(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.set(this,req,depth);
}
// ------------------------------------------------------------
//
// Implements the "check" method defined in "SnmpMibEntry".
// See the "SnmpMibEntry" Javadoc API for more details.
//
// ------------------------------------------------------------
public void check(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.check(this,req,depth);
}
/**
* Returns true if "arc" identifies a scalar object.
*/
public boolean isVariable(long arc) {
switch((int)arc) {
case 33:
case 32:
case 31:
case 133:
case 132:
case 131:
case 13:
case 12:
case 11:
case 10:
case 112:
case 111:
case 110:
case 5:
case 4:
case 3:
case 2:
case 23:
case 1:
case 22:
case 21:
return true;
default:
break;
}
return false;
}
/**
* Returns true if "arc" identifies a readable scalar object.
*/
public boolean isReadable(long arc) {
switch((int)arc) {
case 33:
case 32:
case 31:
case 133:
case 132:
case 131:
case 13:
case 12:
case 11:
case 10:
case 112:
case 111:
case 110:
case 5:
case 4:
case 3:
case 2:
case 23:
case 22:
case 21:
return true;
default:
break;
}
return false;
}
// ------------------------------------------------------------
//
// Implements the "skipVariable" method defined in "SnmpMibEntry".
// See the "SnmpMibEntry" Javadoc API for more details.
//
// ------------------------------------------------------------
public boolean skipVariable(long var, Object data, int pduVersion) {
switch((int)var) {
case 33:
case 32:
case 31:
case 132:
case 131:
case 13:
case 12:
case 11:
case 10:
case 111:
case 110:
case 5:
case 23:
if (pduVersion==SnmpDefinitions.snmpVersionOne) return true;
break;
case 1:
return true;
case 22:
case 21:
if (pduVersion==SnmpDefinitions.snmpVersionOne) return true;
break;
default:
break;
}
return super.skipVariable(var,data,pduVersion);
}
/**
* Return the name of the attribute corresponding to the SNMP variable identified by "id".
*/
public String getAttributeName(long id)
throws SnmpStatusException {
switch((int)id) {
case 33:
return "JvmMemPoolCollectMaxSize";
case 32:
return "JvmMemPoolCollectCommitted";
case 31:
return "JvmMemPoolCollectUsed";
case 133:
return "JvmMemPoolCollectThreshdSupport";
case 132:
return "JvmMemPoolCollectThreshdCount";
case 131:
return "JvmMemPoolCollectThreshold";
case 13:
return "JvmMemPoolMaxSize";
case 12:
return "JvmMemPoolCommitted";
case 11:
return "JvmMemPoolUsed";
case 10:
return "JvmMemPoolInitSize";
case 112:
return "JvmMemPoolThreshdSupport";
case 111:
return "JvmMemPoolThreshdCount";
case 110:
return "JvmMemPoolThreshold";
case 5:
return "JvmMemPoolPeakReset";
case 4:
return "JvmMemPoolState";
case 3:
return "JvmMemPoolType";
case 2:
return "JvmMemPoolName";
case 23:
return "JvmMemPoolPeakMaxSize";
case 1:
return "JvmMemPoolIndex";
case 22:
return "JvmMemPoolPeakCommitted";
case 21:
return "JvmMemPoolPeakUsed";
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
protected JvmMemPoolEntryMBean node;
protected SnmpStandardObjectServer objectserver = null;
}

View File

@@ -0,0 +1,266 @@
/*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// java imports
//
import java.io.Serializable;
import java.util.Vector;
// jmx imports
//
import javax.management.MBeanServer;
import javax.management.ObjectName;
import com.sun.jmx.snmp.SnmpCounter;
import com.sun.jmx.snmp.SnmpCounter64;
import com.sun.jmx.snmp.SnmpGauge;
import com.sun.jmx.snmp.SnmpInt;
import com.sun.jmx.snmp.SnmpUnsignedInt;
import com.sun.jmx.snmp.SnmpIpAddress;
import com.sun.jmx.snmp.SnmpTimeticks;
import com.sun.jmx.snmp.SnmpOpaque;
import com.sun.jmx.snmp.SnmpString;
import com.sun.jmx.snmp.SnmpStringFixed;
import com.sun.jmx.snmp.SnmpOid;
import com.sun.jmx.snmp.SnmpNull;
import com.sun.jmx.snmp.SnmpValue;
import com.sun.jmx.snmp.SnmpVarBind;
import com.sun.jmx.snmp.SnmpStatusException;
// jdmk imports
//
import com.sun.jmx.snmp.agent.SnmpIndex;
import com.sun.jmx.snmp.agent.SnmpMib;
import com.sun.jmx.snmp.agent.SnmpMibTable;
import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
/**
* The class is used for implementing the "JvmMemPoolTable" group.
* The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.
*/
public class JvmMemPoolTableMeta extends SnmpMibTable implements Serializable {
static final long serialVersionUID = -2799470815264898659L;
/**
* Constructor for the table. Initialize metadata for "JvmMemPoolTableMeta".
* The reference on the MBean server is updated so the entries created through an SNMP SET will be AUTOMATICALLY REGISTERED in Java DMK.
*/
public JvmMemPoolTableMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
super(myMib);
objectserver = objserv;
}
/**
* Factory method for "JvmMemPoolEntry" entry metadata class.
*
* You can redefine this method if you need to replace the default
* generated metadata class with your own customized class.
*
* @param snmpEntryName Name of the SNMP Entry object (conceptual row) ("JvmMemPoolEntry")
* @param tableName Name of the table in which the entries are registered ("JvmMemPoolTable")
* @param mib The SnmpMib object in which this table is registered
* @param server MBeanServer for this table entries (may be null)
*
* @return An instance of the metadata class generated for the
* "JvmMemPoolEntry" conceptual row (JvmMemPoolEntryMeta)
*
**/
protected JvmMemPoolEntryMeta createJvmMemPoolEntryMetaNode(String snmpEntryName, String tableName, SnmpMib mib, MBeanServer server) {
return new JvmMemPoolEntryMeta(mib, objectserver);
}
// ------------------------------------------------------------
//
// Implements the "createNewEntry" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public void createNewEntry(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
throws SnmpStatusException {
if (factory != null)
factory.createNewEntry(req, rowOid, depth, this);
else
throw new SnmpStatusException(
SnmpStatusException.snmpRspNoAccess);
}
// ------------------------------------------------------------
//
// Implements the "isRegistrationRequired" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public boolean isRegistrationRequired() {
return false;
}
public void registerEntryNode(SnmpMib mib, MBeanServer server) {
node = createJvmMemPoolEntryMetaNode("JvmMemPoolEntry", "JvmMemPoolTable", mib, server);
}
// ------------------------------------------------------------
//
// Implements the "addEntry" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public synchronized void addEntry(SnmpOid rowOid, ObjectName objname,
Object entry)
throws SnmpStatusException {
if (! (entry instanceof JvmMemPoolEntryMBean) )
throw new ClassCastException("Entries for Table \"" +
"JvmMemPoolTable" + "\" must implement the \"" +
"JvmMemPoolEntryMBean" + "\" interface.");
super.addEntry(rowOid, objname, entry);
}
// ------------------------------------------------------------
//
// Implements the "get" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public void get(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
throws SnmpStatusException {
JvmMemPoolEntryMBean entry = (JvmMemPoolEntryMBean) getEntry(rowOid);
synchronized (this) {
node.setInstance(entry);
node.get(req,depth);
}
}
// ------------------------------------------------------------
//
// Implements the "set" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public void set(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
throws SnmpStatusException {
if (req.getSize() == 0) return;
JvmMemPoolEntryMBean entry = (JvmMemPoolEntryMBean) getEntry(rowOid);
synchronized (this) {
node.setInstance(entry);
node.set(req,depth);
}
}
// ------------------------------------------------------------
//
// Implements the "check" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public void check(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
throws SnmpStatusException {
if (req.getSize() == 0) return;
JvmMemPoolEntryMBean entry = (JvmMemPoolEntryMBean) getEntry(rowOid);
synchronized (this) {
node.setInstance(entry);
node.check(req,depth);
}
}
/**
* check that the given "var" identifies a columnar object.
*/
public void validateVarEntryId( SnmpOid rowOid, long var, Object data )
throws SnmpStatusException {
node.validateVarId(var, data);
}
/**
* Returns true if "var" identifies a readable scalar object.
*/
public boolean isReadableEntryId( SnmpOid rowOid, long var, Object data )
throws SnmpStatusException {
return node.isReadable(var);
}
/**
* Returns the arc of the next columnar object following "var".
*/
public long getNextVarEntryId( SnmpOid rowOid, long var, Object data )
throws SnmpStatusException {
long nextvar = node.getNextVarId(var, data);
while (!isReadableEntryId(rowOid, nextvar, data))
nextvar = node.getNextVarId(nextvar, data);
return nextvar;
}
// ------------------------------------------------------------
//
// Implements the "skipEntryVariable" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public boolean skipEntryVariable( SnmpOid rowOid, long var, Object data, int pduVersion) {
try {
JvmMemPoolEntryMBean entry = (JvmMemPoolEntryMBean) getEntry(rowOid);
synchronized (this) {
node.setInstance(entry);
return node.skipVariable(var, data, pduVersion);
}
} catch (SnmpStatusException x) {
return false;
}
}
/**
* Reference to the entry metadata.
*/
private JvmMemPoolEntryMeta node;
/**
* Reference to the object server.
*/
protected SnmpStandardObjectServer objectserver;
}

View File

@@ -0,0 +1,117 @@
/*
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// jmx imports
//
import com.sun.jmx.snmp.SnmpStatusException;
/**
* This interface is used for representing the remote management interface for the "JvmMemory" MBean.
*/
public interface JvmMemoryMBean {
/**
* Getter for the "JvmMemoryNonHeapMaxSize" variable.
*/
public Long getJvmMemoryNonHeapMaxSize() throws SnmpStatusException;
/**
* Getter for the "JvmMemoryNonHeapCommitted" variable.
*/
public Long getJvmMemoryNonHeapCommitted() throws SnmpStatusException;
/**
* Getter for the "JvmMemoryNonHeapUsed" variable.
*/
public Long getJvmMemoryNonHeapUsed() throws SnmpStatusException;
/**
* Getter for the "JvmMemoryNonHeapInitSize" variable.
*/
public Long getJvmMemoryNonHeapInitSize() throws SnmpStatusException;
/**
* Getter for the "JvmMemoryHeapMaxSize" variable.
*/
public Long getJvmMemoryHeapMaxSize() throws SnmpStatusException;
/**
* Getter for the "JvmMemoryHeapCommitted" variable.
*/
public Long getJvmMemoryHeapCommitted() throws SnmpStatusException;
/**
* Getter for the "JvmMemoryGCCall" variable.
*/
public EnumJvmMemoryGCCall getJvmMemoryGCCall() throws SnmpStatusException;
/**
* Setter for the "JvmMemoryGCCall" variable.
*/
public void setJvmMemoryGCCall(EnumJvmMemoryGCCall x) throws SnmpStatusException;
/**
* Checker for the "JvmMemoryGCCall" variable.
*/
public void checkJvmMemoryGCCall(EnumJvmMemoryGCCall x) throws SnmpStatusException;
/**
* Getter for the "JvmMemoryHeapUsed" variable.
*/
public Long getJvmMemoryHeapUsed() throws SnmpStatusException;
/**
* Getter for the "JvmMemoryGCVerboseLevel" variable.
*/
public EnumJvmMemoryGCVerboseLevel getJvmMemoryGCVerboseLevel() throws SnmpStatusException;
/**
* Setter for the "JvmMemoryGCVerboseLevel" variable.
*/
public void setJvmMemoryGCVerboseLevel(EnumJvmMemoryGCVerboseLevel x) throws SnmpStatusException;
/**
* Checker for the "JvmMemoryGCVerboseLevel" variable.
*/
public void checkJvmMemoryGCVerboseLevel(EnumJvmMemoryGCVerboseLevel x) throws SnmpStatusException;
/**
* Getter for the "JvmMemoryHeapInitSize" variable.
*/
public Long getJvmMemoryHeapInitSize() throws SnmpStatusException;
/**
* Getter for the "JvmMemoryPendingFinalCount" variable.
*/
public Long getJvmMemoryPendingFinalCount() throws SnmpStatusException;
}

View File

@@ -0,0 +1,655 @@
/*
* Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// java imports
//
import java.io.Serializable;
// jmx imports
//
import javax.management.MBeanServer;
import com.sun.jmx.snmp.SnmpCounter;
import com.sun.jmx.snmp.SnmpCounter64;
import com.sun.jmx.snmp.SnmpGauge;
import com.sun.jmx.snmp.SnmpInt;
import com.sun.jmx.snmp.SnmpUnsignedInt;
import com.sun.jmx.snmp.SnmpIpAddress;
import com.sun.jmx.snmp.SnmpTimeticks;
import com.sun.jmx.snmp.SnmpOpaque;
import com.sun.jmx.snmp.SnmpString;
import com.sun.jmx.snmp.SnmpStringFixed;
import com.sun.jmx.snmp.SnmpOid;
import com.sun.jmx.snmp.SnmpNull;
import com.sun.jmx.snmp.SnmpValue;
import com.sun.jmx.snmp.SnmpVarBind;
import com.sun.jmx.snmp.SnmpStatusException;
// jdmk imports
//
import com.sun.jmx.snmp.agent.SnmpMib;
import com.sun.jmx.snmp.agent.SnmpMibGroup;
import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
import com.sun.jmx.snmp.agent.SnmpStandardMetaServer;
import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
import com.sun.jmx.snmp.agent.SnmpMibTable;
import com.sun.jmx.snmp.EnumRowStatus;
import com.sun.jmx.snmp.SnmpDefinitions;
/**
* The class is used for representing SNMP metadata for the "JvmMemory" group.
* The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.2.
*/
public class JvmMemoryMeta extends SnmpMibGroup
implements Serializable, SnmpStandardMetaServer {
private static final long serialVersionUID = 9047644262627149214L;
/**
* Constructor for the metadata associated to "JvmMemory".
*/
public JvmMemoryMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
objectserver = objserv;
try {
registerObject(120);
registerObject(23);
registerObject(22);
registerObject(21);
registerObject(110);
registerObject(20);
registerObject(13);
registerObject(12);
registerObject(3);
registerObject(11);
registerObject(2);
registerObject(101);
registerObject(10);
registerObject(1);
registerObject(100);
} catch (IllegalAccessException e) {
throw new RuntimeException(e.getMessage());
}
}
/**
* Get the value of a scalar variable
*/
public SnmpValue get(long var, Object data)
throws SnmpStatusException {
switch((int)var) {
case 120: {
throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
}
case 23:
return new SnmpCounter64(node.getJvmMemoryNonHeapMaxSize());
case 22:
return new SnmpCounter64(node.getJvmMemoryNonHeapCommitted());
case 21:
return new SnmpCounter64(node.getJvmMemoryNonHeapUsed());
case 110: {
throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
}
case 20:
return new SnmpCounter64(node.getJvmMemoryNonHeapInitSize());
case 13:
return new SnmpCounter64(node.getJvmMemoryHeapMaxSize());
case 12:
return new SnmpCounter64(node.getJvmMemoryHeapCommitted());
case 3:
return new SnmpInt(node.getJvmMemoryGCCall());
case 11:
return new SnmpCounter64(node.getJvmMemoryHeapUsed());
case 2:
return new SnmpInt(node.getJvmMemoryGCVerboseLevel());
case 101: {
throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
}
case 10:
return new SnmpCounter64(node.getJvmMemoryHeapInitSize());
case 1:
return new SnmpGauge(node.getJvmMemoryPendingFinalCount());
case 100: {
throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
}
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
/**
* Set the value of a scalar variable
*/
public SnmpValue set(SnmpValue x, long var, Object data)
throws SnmpStatusException {
switch((int)var) {
case 120: {
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
case 23:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 22:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 21:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 110: {
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
case 20:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 13:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 12:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 3:
if (x instanceof SnmpInt) {
try {
node.setJvmMemoryGCCall( new EnumJvmMemoryGCCall (((SnmpInt)x).toInteger()));
} catch(IllegalArgumentException e) {
throw new SnmpStatusException(SnmpStatusException.snmpRspWrongValue);
}
return new SnmpInt(node.getJvmMemoryGCCall());
} else {
throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
}
case 11:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 2:
if (x instanceof SnmpInt) {
try {
node.setJvmMemoryGCVerboseLevel( new EnumJvmMemoryGCVerboseLevel (((SnmpInt)x).toInteger()));
} catch(IllegalArgumentException e) {
throw new SnmpStatusException(SnmpStatusException.snmpRspWrongValue);
}
return new SnmpInt(node.getJvmMemoryGCVerboseLevel());
} else {
throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
}
case 101: {
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
case 10:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 1:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 100: {
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
/**
* Check the value of a scalar variable
*/
public void check(SnmpValue x, long var, Object data)
throws SnmpStatusException {
switch((int) var) {
case 120: {
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
case 23:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 22:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 21:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 110: {
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
case 20:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 13:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 12:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 3:
if (x instanceof SnmpInt) {
try {
node.checkJvmMemoryGCCall( new EnumJvmMemoryGCCall (((SnmpInt)x).toInteger()));
} catch(IllegalArgumentException e) {
throw new SnmpStatusException(SnmpStatusException.snmpRspWrongValue);
}
} else {
throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
}
break;
case 11:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 2:
if (x instanceof SnmpInt) {
try {
node.checkJvmMemoryGCVerboseLevel( new EnumJvmMemoryGCVerboseLevel (((SnmpInt)x).toInteger()));
} catch(IllegalArgumentException e) {
throw new SnmpStatusException(SnmpStatusException.snmpRspWrongValue);
}
} else {
throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
}
break;
case 101: {
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
case 10:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 1:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 100: {
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
default:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
}
/**
* Allow to bind the metadata description to a specific object.
*/
protected void setInstance(JvmMemoryMBean var) {
node = var;
}
// ------------------------------------------------------------
//
// Implements the "get" method defined in "SnmpMibGroup".
// See the "SnmpMibGroup" Javadoc API for more details.
//
// ------------------------------------------------------------
public void get(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.get(this,req,depth);
}
// ------------------------------------------------------------
//
// Implements the "set" method defined in "SnmpMibGroup".
// See the "SnmpMibGroup" Javadoc API for more details.
//
// ------------------------------------------------------------
public void set(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.set(this,req,depth);
}
// ------------------------------------------------------------
//
// Implements the "check" method defined in "SnmpMibGroup".
// See the "SnmpMibGroup" Javadoc API for more details.
//
// ------------------------------------------------------------
public void check(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.check(this,req,depth);
}
/**
* Returns true if "arc" identifies a scalar object.
*/
public boolean isVariable(long arc) {
switch((int)arc) {
case 23:
case 22:
case 21:
case 20:
case 13:
case 12:
case 3:
case 11:
case 2:
case 10:
case 1:
return true;
default:
break;
}
return false;
}
/**
* Returns true if "arc" identifies a readable scalar object.
*/
public boolean isReadable(long arc) {
switch((int)arc) {
case 23:
case 22:
case 21:
case 20:
case 13:
case 12:
case 3:
case 11:
case 2:
case 10:
case 1:
return true;
default:
break;
}
return false;
}
// ------------------------------------------------------------
//
// Implements the "skipVariable" method defined in "SnmpMibGroup".
// See the "SnmpMibGroup" Javadoc API for more details.
//
// ------------------------------------------------------------
public boolean skipVariable(long var, Object data, int pduVersion) {
switch((int)var) {
case 23:
case 22:
case 21:
case 20:
case 13:
case 12:
case 11:
case 10:
if (pduVersion==SnmpDefinitions.snmpVersionOne) return true;
break;
default:
break;
}
return super.skipVariable(var,data,pduVersion);
}
/**
* Return the name of the attribute corresponding to the SNMP variable identified by "id".
*/
public String getAttributeName(long id)
throws SnmpStatusException {
switch((int)id) {
case 120: {
throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
}
case 23:
return "JvmMemoryNonHeapMaxSize";
case 22:
return "JvmMemoryNonHeapCommitted";
case 21:
return "JvmMemoryNonHeapUsed";
case 110: {
throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
}
case 20:
return "JvmMemoryNonHeapInitSize";
case 13:
return "JvmMemoryHeapMaxSize";
case 12:
return "JvmMemoryHeapCommitted";
case 3:
return "JvmMemoryGCCall";
case 11:
return "JvmMemoryHeapUsed";
case 2:
return "JvmMemoryGCVerboseLevel";
case 101: {
throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
}
case 10:
return "JvmMemoryHeapInitSize";
case 1:
return "JvmMemoryPendingFinalCount";
case 100: {
throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
}
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
/**
* Returns true if "arc" identifies a table object.
*/
public boolean isTable(long arc) {
switch((int)arc) {
case 120:
return true;
case 110:
return true;
case 101:
return true;
case 100:
return true;
default:
break;
}
return false;
}
/**
* Returns the table object identified by "arc".
*/
public SnmpMibTable getTable(long arc) {
switch((int)arc) {
case 120:
return tableJvmMemMgrPoolRelTable;
case 110:
return tableJvmMemPoolTable;
case 101:
return tableJvmMemGCTable;
case 100:
return tableJvmMemManagerTable;
default:
break;
}
return null;
}
/**
* Register the group's SnmpMibTable objects with the meta-data.
*/
public void registerTableNodes(SnmpMib mib, MBeanServer server) {
tableJvmMemMgrPoolRelTable = createJvmMemMgrPoolRelTableMetaNode("JvmMemMgrPoolRelTable", "JvmMemory", mib, server);
if ( tableJvmMemMgrPoolRelTable != null) {
tableJvmMemMgrPoolRelTable.registerEntryNode(mib,server);
mib.registerTableMeta("JvmMemMgrPoolRelTable", tableJvmMemMgrPoolRelTable);
}
tableJvmMemPoolTable = createJvmMemPoolTableMetaNode("JvmMemPoolTable", "JvmMemory", mib, server);
if ( tableJvmMemPoolTable != null) {
tableJvmMemPoolTable.registerEntryNode(mib,server);
mib.registerTableMeta("JvmMemPoolTable", tableJvmMemPoolTable);
}
tableJvmMemGCTable = createJvmMemGCTableMetaNode("JvmMemGCTable", "JvmMemory", mib, server);
if ( tableJvmMemGCTable != null) {
tableJvmMemGCTable.registerEntryNode(mib,server);
mib.registerTableMeta("JvmMemGCTable", tableJvmMemGCTable);
}
tableJvmMemManagerTable = createJvmMemManagerTableMetaNode("JvmMemManagerTable", "JvmMemory", mib, server);
if ( tableJvmMemManagerTable != null) {
tableJvmMemManagerTable.registerEntryNode(mib,server);
mib.registerTableMeta("JvmMemManagerTable", tableJvmMemManagerTable);
}
}
/**
* Factory method for "JvmMemMgrPoolRelTable" table metadata class.
*
* You can redefine this method if you need to replace the default
* generated metadata class with your own customized class.
*
* @param tableName Name of the table object ("JvmMemMgrPoolRelTable")
* @param groupName Name of the group to which this table belong ("JvmMemory")
* @param mib The SnmpMib object in which this table is registered
* @param server MBeanServer for this table entries (may be null)
*
* @return An instance of the metadata class generated for the
* "JvmMemMgrPoolRelTable" table (JvmMemMgrPoolRelTableMeta)
*
**/
protected JvmMemMgrPoolRelTableMeta createJvmMemMgrPoolRelTableMetaNode(String tableName, String groupName, SnmpMib mib, MBeanServer server) {
return new JvmMemMgrPoolRelTableMeta(mib, objectserver);
}
/**
* Factory method for "JvmMemPoolTable" table metadata class.
*
* You can redefine this method if you need to replace the default
* generated metadata class with your own customized class.
*
* @param tableName Name of the table object ("JvmMemPoolTable")
* @param groupName Name of the group to which this table belong ("JvmMemory")
* @param mib The SnmpMib object in which this table is registered
* @param server MBeanServer for this table entries (may be null)
*
* @return An instance of the metadata class generated for the
* "JvmMemPoolTable" table (JvmMemPoolTableMeta)
*
**/
protected JvmMemPoolTableMeta createJvmMemPoolTableMetaNode(String tableName, String groupName, SnmpMib mib, MBeanServer server) {
return new JvmMemPoolTableMeta(mib, objectserver);
}
/**
* Factory method for "JvmMemGCTable" table metadata class.
*
* You can redefine this method if you need to replace the default
* generated metadata class with your own customized class.
*
* @param tableName Name of the table object ("JvmMemGCTable")
* @param groupName Name of the group to which this table belong ("JvmMemory")
* @param mib The SnmpMib object in which this table is registered
* @param server MBeanServer for this table entries (may be null)
*
* @return An instance of the metadata class generated for the
* "JvmMemGCTable" table (JvmMemGCTableMeta)
*
**/
protected JvmMemGCTableMeta createJvmMemGCTableMetaNode(String tableName, String groupName, SnmpMib mib, MBeanServer server) {
return new JvmMemGCTableMeta(mib, objectserver);
}
/**
* Factory method for "JvmMemManagerTable" table metadata class.
*
* You can redefine this method if you need to replace the default
* generated metadata class with your own customized class.
*
* @param tableName Name of the table object ("JvmMemManagerTable")
* @param groupName Name of the group to which this table belong ("JvmMemory")
* @param mib The SnmpMib object in which this table is registered
* @param server MBeanServer for this table entries (may be null)
*
* @return An instance of the metadata class generated for the
* "JvmMemManagerTable" table (JvmMemManagerTableMeta)
*
**/
protected JvmMemManagerTableMeta createJvmMemManagerTableMetaNode(String tableName, String groupName, SnmpMib mib, MBeanServer server) {
return new JvmMemManagerTableMeta(mib, objectserver);
}
protected JvmMemoryMBean node;
protected SnmpStandardObjectServer objectserver = null;
protected JvmMemMgrPoolRelTableMeta tableJvmMemMgrPoolRelTable = null;
protected JvmMemPoolTableMeta tableJvmMemPoolTable = null;
protected JvmMemGCTableMeta tableJvmMemGCTable = null;
protected JvmMemManagerTableMeta tableJvmMemManagerTable = null;
}

View File

@@ -0,0 +1,62 @@
/*
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// jmx imports
//
import com.sun.jmx.snmp.SnmpStatusException;
/**
* This interface is used for representing the remote management interface for the "JvmOS" MBean.
*/
public interface JvmOSMBean {
/**
* Getter for the "JvmOSProcessorCount" variable.
*/
public Integer getJvmOSProcessorCount() throws SnmpStatusException;
/**
* Getter for the "JvmOSVersion" variable.
*/
public String getJvmOSVersion() throws SnmpStatusException;
/**
* Getter for the "JvmOSArch" variable.
*/
public String getJvmOSArch() throws SnmpStatusException;
/**
* Getter for the "JvmOSName" variable.
*/
public String getJvmOSName() throws SnmpStatusException;
}

View File

@@ -0,0 +1,304 @@
/*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// java imports
//
import java.io.Serializable;
// jmx imports
//
import javax.management.MBeanServer;
import com.sun.jmx.snmp.SnmpCounter;
import com.sun.jmx.snmp.SnmpCounter64;
import com.sun.jmx.snmp.SnmpGauge;
import com.sun.jmx.snmp.SnmpInt;
import com.sun.jmx.snmp.SnmpUnsignedInt;
import com.sun.jmx.snmp.SnmpIpAddress;
import com.sun.jmx.snmp.SnmpTimeticks;
import com.sun.jmx.snmp.SnmpOpaque;
import com.sun.jmx.snmp.SnmpString;
import com.sun.jmx.snmp.SnmpStringFixed;
import com.sun.jmx.snmp.SnmpOid;
import com.sun.jmx.snmp.SnmpNull;
import com.sun.jmx.snmp.SnmpValue;
import com.sun.jmx.snmp.SnmpVarBind;
import com.sun.jmx.snmp.SnmpStatusException;
// jdmk imports
//
import com.sun.jmx.snmp.agent.SnmpMib;
import com.sun.jmx.snmp.agent.SnmpMibGroup;
import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
import com.sun.jmx.snmp.agent.SnmpStandardMetaServer;
import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
import com.sun.jmx.snmp.agent.SnmpMibTable;
import com.sun.jmx.snmp.EnumRowStatus;
import com.sun.jmx.snmp.SnmpDefinitions;
/**
* The class is used for representing SNMP metadata for the "JvmOS" group.
* The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.6.
*/
public class JvmOSMeta extends SnmpMibGroup
implements Serializable, SnmpStandardMetaServer {
static final long serialVersionUID = -2024138733580127133L;
/**
* Constructor for the metadata associated to "JvmOS".
*/
public JvmOSMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
objectserver = objserv;
try {
registerObject(4);
registerObject(3);
registerObject(2);
registerObject(1);
} catch (IllegalAccessException e) {
throw new RuntimeException(e.getMessage());
}
}
/**
* Get the value of a scalar variable
*/
public SnmpValue get(long var, Object data)
throws SnmpStatusException {
switch((int)var) {
case 4:
return new SnmpInt(node.getJvmOSProcessorCount());
case 3:
return new SnmpString(node.getJvmOSVersion());
case 2:
return new SnmpString(node.getJvmOSArch());
case 1:
return new SnmpString(node.getJvmOSName());
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
/**
* Set the value of a scalar variable
*/
public SnmpValue set(SnmpValue x, long var, Object data)
throws SnmpStatusException {
switch((int)var) {
case 4:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 3:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 2:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 1:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
/**
* Check the value of a scalar variable
*/
public void check(SnmpValue x, long var, Object data)
throws SnmpStatusException {
switch((int) var) {
case 4:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 3:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 2:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 1:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
default:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
}
/**
* Allow to bind the metadata description to a specific object.
*/
protected void setInstance(JvmOSMBean var) {
node = var;
}
// ------------------------------------------------------------
//
// Implements the "get" method defined in "SnmpMibGroup".
// See the "SnmpMibGroup" Javadoc API for more details.
//
// ------------------------------------------------------------
public void get(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.get(this,req,depth);
}
// ------------------------------------------------------------
//
// Implements the "set" method defined in "SnmpMibGroup".
// See the "SnmpMibGroup" Javadoc API for more details.
//
// ------------------------------------------------------------
public void set(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.set(this,req,depth);
}
// ------------------------------------------------------------
//
// Implements the "check" method defined in "SnmpMibGroup".
// See the "SnmpMibGroup" Javadoc API for more details.
//
// ------------------------------------------------------------
public void check(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.check(this,req,depth);
}
/**
* Returns true if "arc" identifies a scalar object.
*/
public boolean isVariable(long arc) {
switch((int)arc) {
case 4:
case 3:
case 2:
case 1:
return true;
default:
break;
}
return false;
}
/**
* Returns true if "arc" identifies a readable scalar object.
*/
public boolean isReadable(long arc) {
switch((int)arc) {
case 4:
case 3:
case 2:
case 1:
return true;
default:
break;
}
return false;
}
// ------------------------------------------------------------
//
// Implements the "skipVariable" method defined in "SnmpMibGroup".
// See the "SnmpMibGroup" Javadoc API for more details.
//
// ------------------------------------------------------------
public boolean skipVariable(long var, Object data, int pduVersion) {
return super.skipVariable(var,data,pduVersion);
}
/**
* Return the name of the attribute corresponding to the SNMP variable identified by "id".
*/
public String getAttributeName(long id)
throws SnmpStatusException {
switch((int)id) {
case 4:
return "JvmOSProcessorCount";
case 3:
return "JvmOSVersion";
case 2:
return "JvmOSArch";
case 1:
return "JvmOSName";
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
/**
* Returns true if "arc" identifies a table object.
*/
public boolean isTable(long arc) {
switch((int)arc) {
default:
break;
}
return false;
}
/**
* Returns the table object identified by "arc".
*/
public SnmpMibTable getTable(long arc) {
return null;
}
/**
* Register the group's SnmpMibTable objects with the meta-data.
*/
public void registerTableNodes(SnmpMib mib, MBeanServer server) {
}
protected JvmOSMBean node;
protected SnmpStandardObjectServer objectserver = null;
}

View File

@@ -0,0 +1,52 @@
/*
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// jmx imports
//
import com.sun.jmx.snmp.SnmpStatusException;
/**
* This interface is used for representing the remote management interface for the "JvmRTBootClassPathEntry" MBean.
*/
public interface JvmRTBootClassPathEntryMBean {
/**
* Getter for the "JvmRTBootClassPathItem" variable.
*/
public String getJvmRTBootClassPathItem() throws SnmpStatusException;
/**
* Getter for the "JvmRTBootClassPathIndex" variable.
*/
public Integer getJvmRTBootClassPathIndex() throws SnmpStatusException;
}

View File

@@ -0,0 +1,250 @@
/*
* Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// java imports
//
import java.io.Serializable;
// jmx imports
//
import javax.management.MBeanServer;
import com.sun.jmx.snmp.SnmpCounter;
import com.sun.jmx.snmp.SnmpCounter64;
import com.sun.jmx.snmp.SnmpGauge;
import com.sun.jmx.snmp.SnmpInt;
import com.sun.jmx.snmp.SnmpUnsignedInt;
import com.sun.jmx.snmp.SnmpIpAddress;
import com.sun.jmx.snmp.SnmpTimeticks;
import com.sun.jmx.snmp.SnmpOpaque;
import com.sun.jmx.snmp.SnmpString;
import com.sun.jmx.snmp.SnmpStringFixed;
import com.sun.jmx.snmp.SnmpOid;
import com.sun.jmx.snmp.SnmpNull;
import com.sun.jmx.snmp.SnmpValue;
import com.sun.jmx.snmp.SnmpVarBind;
import com.sun.jmx.snmp.SnmpStatusException;
// jdmk imports
//
import com.sun.jmx.snmp.agent.SnmpMibNode;
import com.sun.jmx.snmp.agent.SnmpMib;
import com.sun.jmx.snmp.agent.SnmpMibEntry;
import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
import com.sun.jmx.snmp.agent.SnmpStandardMetaServer;
import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
import com.sun.jmx.snmp.agent.SnmpMibTable;
import com.sun.jmx.snmp.EnumRowStatus;
import com.sun.jmx.snmp.SnmpDefinitions;
/**
* The class is used for representing SNMP metadata for the "JvmRTBootClassPathEntry" group.
* The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.4.21.1.
*/
public class JvmRTBootClassPathEntryMeta extends SnmpMibEntry
implements Serializable, SnmpStandardMetaServer {
static final long serialVersionUID = 7703840715080588941L;
/**
* Constructor for the metadata associated to "JvmRTBootClassPathEntry".
*/
public JvmRTBootClassPathEntryMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
objectserver = objserv;
varList = new int[1];
varList[0] = 2;
SnmpMibNode.sort(varList);
}
/**
* Get the value of a scalar variable
*/
public SnmpValue get(long var, Object data)
throws SnmpStatusException {
switch((int)var) {
case 2:
return new SnmpString(node.getJvmRTBootClassPathItem());
case 1:
throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
/**
* Set the value of a scalar variable
*/
public SnmpValue set(SnmpValue x, long var, Object data)
throws SnmpStatusException {
switch((int)var) {
case 2:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 1:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
/**
* Check the value of a scalar variable
*/
public void check(SnmpValue x, long var, Object data)
throws SnmpStatusException {
switch((int) var) {
case 2:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 1:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
default:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
}
/**
* Allow to bind the metadata description to a specific object.
*/
protected void setInstance(JvmRTBootClassPathEntryMBean var) {
node = var;
}
// ------------------------------------------------------------
//
// Implements the "get" method defined in "SnmpMibEntry".
// See the "SnmpMibEntry" Javadoc API for more details.
//
// ------------------------------------------------------------
public void get(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.get(this,req,depth);
}
// ------------------------------------------------------------
//
// Implements the "set" method defined in "SnmpMibEntry".
// See the "SnmpMibEntry" Javadoc API for more details.
//
// ------------------------------------------------------------
public void set(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.set(this,req,depth);
}
// ------------------------------------------------------------
//
// Implements the "check" method defined in "SnmpMibEntry".
// See the "SnmpMibEntry" Javadoc API for more details.
//
// ------------------------------------------------------------
public void check(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.check(this,req,depth);
}
/**
* Returns true if "arc" identifies a scalar object.
*/
public boolean isVariable(long arc) {
switch((int)arc) {
case 2:
case 1:
return true;
default:
break;
}
return false;
}
/**
* Returns true if "arc" identifies a readable scalar object.
*/
public boolean isReadable(long arc) {
switch((int)arc) {
case 2:
return true;
default:
break;
}
return false;
}
// ------------------------------------------------------------
//
// Implements the "skipVariable" method defined in "SnmpMibEntry".
// See the "SnmpMibEntry" Javadoc API for more details.
//
// ------------------------------------------------------------
public boolean skipVariable(long var, Object data, int pduVersion) {
switch((int)var) {
case 1:
return true;
default:
break;
}
return super.skipVariable(var,data,pduVersion);
}
/**
* Return the name of the attribute corresponding to the SNMP variable identified by "id".
*/
public String getAttributeName(long id)
throws SnmpStatusException {
switch((int)id) {
case 2:
return "JvmRTBootClassPathItem";
case 1:
return "JvmRTBootClassPathIndex";
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
protected JvmRTBootClassPathEntryMBean node;
protected SnmpStandardObjectServer objectserver = null;
}

View File

@@ -0,0 +1,265 @@
/*
* Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// java imports
//
import java.io.Serializable;
import java.util.Vector;
// jmx imports
//
import javax.management.MBeanServer;
import javax.management.ObjectName;
import com.sun.jmx.snmp.SnmpCounter;
import com.sun.jmx.snmp.SnmpCounter64;
import com.sun.jmx.snmp.SnmpGauge;
import com.sun.jmx.snmp.SnmpInt;
import com.sun.jmx.snmp.SnmpUnsignedInt;
import com.sun.jmx.snmp.SnmpIpAddress;
import com.sun.jmx.snmp.SnmpTimeticks;
import com.sun.jmx.snmp.SnmpOpaque;
import com.sun.jmx.snmp.SnmpString;
import com.sun.jmx.snmp.SnmpStringFixed;
import com.sun.jmx.snmp.SnmpOid;
import com.sun.jmx.snmp.SnmpNull;
import com.sun.jmx.snmp.SnmpValue;
import com.sun.jmx.snmp.SnmpVarBind;
import com.sun.jmx.snmp.SnmpStatusException;
// jdmk imports
//
import com.sun.jmx.snmp.agent.SnmpIndex;
import com.sun.jmx.snmp.agent.SnmpMib;
import com.sun.jmx.snmp.agent.SnmpMibTable;
import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
/**
* The class is used for implementing the "JvmRTBootClassPathTable" group.
* The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.4.21.
*/
public class JvmRTBootClassPathTableMeta extends SnmpMibTable implements Serializable {
static final long serialVersionUID = 42471379600792135L;
/**
* Constructor for the table. Initialize metadata for "JvmRTBootClassPathTableMeta".
* The reference on the MBean server is updated so the entries created through an SNMP SET will be AUTOMATICALLY REGISTERED in Java DMK.
*/
public JvmRTBootClassPathTableMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
super(myMib);
objectserver = objserv;
}
/**
* Factory method for "JvmRTBootClassPathEntry" entry metadata class.
*
* You can redefine this method if you need to replace the default
* generated metadata class with your own customized class.
*
* @param snmpEntryName Name of the SNMP Entry object (conceptual row) ("JvmRTBootClassPathEntry")
* @param tableName Name of the table in which the entries are registered ("JvmRTBootClassPathTable")
* @param mib The SnmpMib object in which this table is registered
* @param server MBeanServer for this table entries (may be null)
*
* @return An instance of the metadata class generated for the
* "JvmRTBootClassPathEntry" conceptual row (JvmRTBootClassPathEntryMeta)
*
**/
protected JvmRTBootClassPathEntryMeta createJvmRTBootClassPathEntryMetaNode(String snmpEntryName, String tableName, SnmpMib mib, MBeanServer server) {
return new JvmRTBootClassPathEntryMeta(mib, objectserver);
}
// ------------------------------------------------------------
//
// Implements the "createNewEntry" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public void createNewEntry(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
throws SnmpStatusException {
if (factory != null)
factory.createNewEntry(req, rowOid, depth, this);
else
throw new SnmpStatusException(
SnmpStatusException.snmpRspNoAccess);
}
// ------------------------------------------------------------
//
// Implements the "isRegistrationRequired" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public boolean isRegistrationRequired() {
return false;
}
public void registerEntryNode(SnmpMib mib, MBeanServer server) {
node = createJvmRTBootClassPathEntryMetaNode("JvmRTBootClassPathEntry", "JvmRTBootClassPathTable", mib, server);
}
// ------------------------------------------------------------
//
// Implements the "addEntry" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public synchronized void addEntry(SnmpOid rowOid, ObjectName objname,
Object entry)
throws SnmpStatusException {
if (! (entry instanceof JvmRTBootClassPathEntryMBean) )
throw new ClassCastException("Entries for Table \"" +
"JvmRTBootClassPathTable" + "\" must implement the \"" +
"JvmRTBootClassPathEntryMBean" + "\" interface.");
super.addEntry(rowOid, objname, entry);
}
// ------------------------------------------------------------
//
// Implements the "get" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public void get(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
throws SnmpStatusException {
JvmRTBootClassPathEntryMBean entry = (JvmRTBootClassPathEntryMBean) getEntry(rowOid);
synchronized (this) {
node.setInstance(entry);
node.get(req,depth);
}
}
// ------------------------------------------------------------
//
// Implements the "set" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public void set(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
throws SnmpStatusException {
if (req.getSize() == 0) return;
JvmRTBootClassPathEntryMBean entry = (JvmRTBootClassPathEntryMBean) getEntry(rowOid);
synchronized (this) {
node.setInstance(entry);
node.set(req,depth);
}
}
// ------------------------------------------------------------
//
// Implements the "check" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public void check(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
throws SnmpStatusException {
if (req.getSize() == 0) return;
JvmRTBootClassPathEntryMBean entry = (JvmRTBootClassPathEntryMBean) getEntry(rowOid);
synchronized (this) {
node.setInstance(entry);
node.check(req,depth);
}
}
/**
* check that the given "var" identifies a columnar object.
*/
public void validateVarEntryId( SnmpOid rowOid, long var, Object data )
throws SnmpStatusException {
node.validateVarId(var, data);
}
/**
* Returns true if "var" identifies a readable scalar object.
*/
public boolean isReadableEntryId( SnmpOid rowOid, long var, Object data )
throws SnmpStatusException {
return node.isReadable(var);
}
/**
* Returns the arc of the next columnar object following "var".
*/
public long getNextVarEntryId( SnmpOid rowOid, long var, Object data )
throws SnmpStatusException {
long nextvar = node.getNextVarId(var, data);
while (!isReadableEntryId(rowOid, nextvar, data))
nextvar = node.getNextVarId(nextvar, data);
return nextvar;
}
// ------------------------------------------------------------
//
// Implements the "skipEntryVariable" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public boolean skipEntryVariable( SnmpOid rowOid, long var, Object data, int pduVersion) {
try {
JvmRTBootClassPathEntryMBean entry = (JvmRTBootClassPathEntryMBean) getEntry(rowOid);
synchronized (this) {
node.setInstance(entry);
return node.skipVariable(var, data, pduVersion);
}
} catch (SnmpStatusException x) {
return false;
}
}
/**
* Reference to the entry metadata.
*/
private JvmRTBootClassPathEntryMeta node;
/**
* Reference to the object server.
*/
protected SnmpStandardObjectServer objectserver;
}

View File

@@ -0,0 +1,52 @@
/*
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// jmx imports
//
import com.sun.jmx.snmp.SnmpStatusException;
/**
* This interface is used for representing the remote management interface for the "JvmRTClassPathEntry" MBean.
*/
public interface JvmRTClassPathEntryMBean {
/**
* Getter for the "JvmRTClassPathItem" variable.
*/
public String getJvmRTClassPathItem() throws SnmpStatusException;
/**
* Getter for the "JvmRTClassPathIndex" variable.
*/
public Integer getJvmRTClassPathIndex() throws SnmpStatusException;
}

View File

@@ -0,0 +1,250 @@
/*
* Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// java imports
//
import java.io.Serializable;
// jmx imports
//
import javax.management.MBeanServer;
import com.sun.jmx.snmp.SnmpCounter;
import com.sun.jmx.snmp.SnmpCounter64;
import com.sun.jmx.snmp.SnmpGauge;
import com.sun.jmx.snmp.SnmpInt;
import com.sun.jmx.snmp.SnmpUnsignedInt;
import com.sun.jmx.snmp.SnmpIpAddress;
import com.sun.jmx.snmp.SnmpTimeticks;
import com.sun.jmx.snmp.SnmpOpaque;
import com.sun.jmx.snmp.SnmpString;
import com.sun.jmx.snmp.SnmpStringFixed;
import com.sun.jmx.snmp.SnmpOid;
import com.sun.jmx.snmp.SnmpNull;
import com.sun.jmx.snmp.SnmpValue;
import com.sun.jmx.snmp.SnmpVarBind;
import com.sun.jmx.snmp.SnmpStatusException;
// jdmk imports
//
import com.sun.jmx.snmp.agent.SnmpMibNode;
import com.sun.jmx.snmp.agent.SnmpMib;
import com.sun.jmx.snmp.agent.SnmpMibEntry;
import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
import com.sun.jmx.snmp.agent.SnmpStandardMetaServer;
import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
import com.sun.jmx.snmp.agent.SnmpMibTable;
import com.sun.jmx.snmp.EnumRowStatus;
import com.sun.jmx.snmp.SnmpDefinitions;
/**
* The class is used for representing SNMP metadata for the "JvmRTClassPathEntry" group.
* The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.4.22.1.
*/
public class JvmRTClassPathEntryMeta extends SnmpMibEntry
implements Serializable, SnmpStandardMetaServer {
static final long serialVersionUID = 3388703998226830801L;
/**
* Constructor for the metadata associated to "JvmRTClassPathEntry".
*/
public JvmRTClassPathEntryMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
objectserver = objserv;
varList = new int[1];
varList[0] = 2;
SnmpMibNode.sort(varList);
}
/**
* Get the value of a scalar variable
*/
public SnmpValue get(long var, Object data)
throws SnmpStatusException {
switch((int)var) {
case 2:
return new SnmpString(node.getJvmRTClassPathItem());
case 1:
throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
/**
* Set the value of a scalar variable
*/
public SnmpValue set(SnmpValue x, long var, Object data)
throws SnmpStatusException {
switch((int)var) {
case 2:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 1:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
/**
* Check the value of a scalar variable
*/
public void check(SnmpValue x, long var, Object data)
throws SnmpStatusException {
switch((int) var) {
case 2:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 1:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
default:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
}
/**
* Allow to bind the metadata description to a specific object.
*/
protected void setInstance(JvmRTClassPathEntryMBean var) {
node = var;
}
// ------------------------------------------------------------
//
// Implements the "get" method defined in "SnmpMibEntry".
// See the "SnmpMibEntry" Javadoc API for more details.
//
// ------------------------------------------------------------
public void get(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.get(this,req,depth);
}
// ------------------------------------------------------------
//
// Implements the "set" method defined in "SnmpMibEntry".
// See the "SnmpMibEntry" Javadoc API for more details.
//
// ------------------------------------------------------------
public void set(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.set(this,req,depth);
}
// ------------------------------------------------------------
//
// Implements the "check" method defined in "SnmpMibEntry".
// See the "SnmpMibEntry" Javadoc API for more details.
//
// ------------------------------------------------------------
public void check(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.check(this,req,depth);
}
/**
* Returns true if "arc" identifies a scalar object.
*/
public boolean isVariable(long arc) {
switch((int)arc) {
case 2:
case 1:
return true;
default:
break;
}
return false;
}
/**
* Returns true if "arc" identifies a readable scalar object.
*/
public boolean isReadable(long arc) {
switch((int)arc) {
case 2:
return true;
default:
break;
}
return false;
}
// ------------------------------------------------------------
//
// Implements the "skipVariable" method defined in "SnmpMibEntry".
// See the "SnmpMibEntry" Javadoc API for more details.
//
// ------------------------------------------------------------
public boolean skipVariable(long var, Object data, int pduVersion) {
switch((int)var) {
case 1:
return true;
default:
break;
}
return super.skipVariable(var,data,pduVersion);
}
/**
* Return the name of the attribute corresponding to the SNMP variable identified by "id".
*/
public String getAttributeName(long id)
throws SnmpStatusException {
switch((int)id) {
case 2:
return "JvmRTClassPathItem";
case 1:
return "JvmRTClassPathIndex";
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
protected JvmRTClassPathEntryMBean node;
protected SnmpStandardObjectServer objectserver = null;
}

View File

@@ -0,0 +1,265 @@
/*
* Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// java imports
//
import java.io.Serializable;
import java.util.Vector;
// jmx imports
//
import javax.management.MBeanServer;
import javax.management.ObjectName;
import com.sun.jmx.snmp.SnmpCounter;
import com.sun.jmx.snmp.SnmpCounter64;
import com.sun.jmx.snmp.SnmpGauge;
import com.sun.jmx.snmp.SnmpInt;
import com.sun.jmx.snmp.SnmpUnsignedInt;
import com.sun.jmx.snmp.SnmpIpAddress;
import com.sun.jmx.snmp.SnmpTimeticks;
import com.sun.jmx.snmp.SnmpOpaque;
import com.sun.jmx.snmp.SnmpString;
import com.sun.jmx.snmp.SnmpStringFixed;
import com.sun.jmx.snmp.SnmpOid;
import com.sun.jmx.snmp.SnmpNull;
import com.sun.jmx.snmp.SnmpValue;
import com.sun.jmx.snmp.SnmpVarBind;
import com.sun.jmx.snmp.SnmpStatusException;
// jdmk imports
//
import com.sun.jmx.snmp.agent.SnmpIndex;
import com.sun.jmx.snmp.agent.SnmpMib;
import com.sun.jmx.snmp.agent.SnmpMibTable;
import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
/**
* The class is used for implementing the "JvmRTClassPathTable" group.
* The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.4.22.
*/
public class JvmRTClassPathTableMeta extends SnmpMibTable implements Serializable {
static final long serialVersionUID = -1518727175345404443L;
/**
* Constructor for the table. Initialize metadata for "JvmRTClassPathTableMeta".
* The reference on the MBean server is updated so the entries created through an SNMP SET will be AUTOMATICALLY REGISTERED in Java DMK.
*/
public JvmRTClassPathTableMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
super(myMib);
objectserver = objserv;
}
/**
* Factory method for "JvmRTClassPathEntry" entry metadata class.
*
* You can redefine this method if you need to replace the default
* generated metadata class with your own customized class.
*
* @param snmpEntryName Name of the SNMP Entry object (conceptual row) ("JvmRTClassPathEntry")
* @param tableName Name of the table in which the entries are registered ("JvmRTClassPathTable")
* @param mib The SnmpMib object in which this table is registered
* @param server MBeanServer for this table entries (may be null)
*
* @return An instance of the metadata class generated for the
* "JvmRTClassPathEntry" conceptual row (JvmRTClassPathEntryMeta)
*
**/
protected JvmRTClassPathEntryMeta createJvmRTClassPathEntryMetaNode(String snmpEntryName, String tableName, SnmpMib mib, MBeanServer server) {
return new JvmRTClassPathEntryMeta(mib, objectserver);
}
// ------------------------------------------------------------
//
// Implements the "createNewEntry" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public void createNewEntry(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
throws SnmpStatusException {
if (factory != null)
factory.createNewEntry(req, rowOid, depth, this);
else
throw new SnmpStatusException(
SnmpStatusException.snmpRspNoAccess);
}
// ------------------------------------------------------------
//
// Implements the "isRegistrationRequired" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public boolean isRegistrationRequired() {
return false;
}
public void registerEntryNode(SnmpMib mib, MBeanServer server) {
node = createJvmRTClassPathEntryMetaNode("JvmRTClassPathEntry", "JvmRTClassPathTable", mib, server);
}
// ------------------------------------------------------------
//
// Implements the "addEntry" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public synchronized void addEntry(SnmpOid rowOid, ObjectName objname,
Object entry)
throws SnmpStatusException {
if (! (entry instanceof JvmRTClassPathEntryMBean) )
throw new ClassCastException("Entries for Table \"" +
"JvmRTClassPathTable" + "\" must implement the \"" +
"JvmRTClassPathEntryMBean" + "\" interface.");
super.addEntry(rowOid, objname, entry);
}
// ------------------------------------------------------------
//
// Implements the "get" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public void get(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
throws SnmpStatusException {
JvmRTClassPathEntryMBean entry = (JvmRTClassPathEntryMBean) getEntry(rowOid);
synchronized (this) {
node.setInstance(entry);
node.get(req,depth);
}
}
// ------------------------------------------------------------
//
// Implements the "set" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public void set(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
throws SnmpStatusException {
if (req.getSize() == 0) return;
JvmRTClassPathEntryMBean entry = (JvmRTClassPathEntryMBean) getEntry(rowOid);
synchronized (this) {
node.setInstance(entry);
node.set(req,depth);
}
}
// ------------------------------------------------------------
//
// Implements the "check" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public void check(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
throws SnmpStatusException {
if (req.getSize() == 0) return;
JvmRTClassPathEntryMBean entry = (JvmRTClassPathEntryMBean) getEntry(rowOid);
synchronized (this) {
node.setInstance(entry);
node.check(req,depth);
}
}
/**
* check that the given "var" identifies a columnar object.
*/
public void validateVarEntryId( SnmpOid rowOid, long var, Object data )
throws SnmpStatusException {
node.validateVarId(var, data);
}
/**
* Returns true if "var" identifies a readable scalar object.
*/
public boolean isReadableEntryId( SnmpOid rowOid, long var, Object data )
throws SnmpStatusException {
return node.isReadable(var);
}
/**
* Returns the arc of the next columnar object following "var".
*/
public long getNextVarEntryId( SnmpOid rowOid, long var, Object data )
throws SnmpStatusException {
long nextvar = node.getNextVarId(var, data);
while (!isReadableEntryId(rowOid, nextvar, data))
nextvar = node.getNextVarId(nextvar, data);
return nextvar;
}
// ------------------------------------------------------------
//
// Implements the "skipEntryVariable" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public boolean skipEntryVariable( SnmpOid rowOid, long var, Object data, int pduVersion) {
try {
JvmRTClassPathEntryMBean entry = (JvmRTClassPathEntryMBean) getEntry(rowOid);
synchronized (this) {
node.setInstance(entry);
return node.skipVariable(var, data, pduVersion);
}
} catch (SnmpStatusException x) {
return false;
}
}
/**
* Reference to the entry metadata.
*/
private JvmRTClassPathEntryMeta node;
/**
* Reference to the object server.
*/
protected SnmpStandardObjectServer objectserver;
}

View File

@@ -0,0 +1,52 @@
/*
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// jmx imports
//
import com.sun.jmx.snmp.SnmpStatusException;
/**
* This interface is used for representing the remote management interface for the "JvmRTInputArgsEntry" MBean.
*/
public interface JvmRTInputArgsEntryMBean {
/**
* Getter for the "JvmRTInputArgsItem" variable.
*/
public String getJvmRTInputArgsItem() throws SnmpStatusException;
/**
* Getter for the "JvmRTInputArgsIndex" variable.
*/
public Integer getJvmRTInputArgsIndex() throws SnmpStatusException;
}

View File

@@ -0,0 +1,250 @@
/*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// java imports
//
import java.io.Serializable;
// jmx imports
//
import javax.management.MBeanServer;
import com.sun.jmx.snmp.SnmpCounter;
import com.sun.jmx.snmp.SnmpCounter64;
import com.sun.jmx.snmp.SnmpGauge;
import com.sun.jmx.snmp.SnmpInt;
import com.sun.jmx.snmp.SnmpUnsignedInt;
import com.sun.jmx.snmp.SnmpIpAddress;
import com.sun.jmx.snmp.SnmpTimeticks;
import com.sun.jmx.snmp.SnmpOpaque;
import com.sun.jmx.snmp.SnmpString;
import com.sun.jmx.snmp.SnmpStringFixed;
import com.sun.jmx.snmp.SnmpOid;
import com.sun.jmx.snmp.SnmpNull;
import com.sun.jmx.snmp.SnmpValue;
import com.sun.jmx.snmp.SnmpVarBind;
import com.sun.jmx.snmp.SnmpStatusException;
// jdmk imports
//
import com.sun.jmx.snmp.agent.SnmpMibNode;
import com.sun.jmx.snmp.agent.SnmpMib;
import com.sun.jmx.snmp.agent.SnmpMibEntry;
import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
import com.sun.jmx.snmp.agent.SnmpStandardMetaServer;
import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
import com.sun.jmx.snmp.agent.SnmpMibTable;
import com.sun.jmx.snmp.EnumRowStatus;
import com.sun.jmx.snmp.SnmpDefinitions;
/**
* The class is used for representing SNMP metadata for the "JvmRTInputArgsEntry" group.
* The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.4.20.1.
*/
public class JvmRTInputArgsEntryMeta extends SnmpMibEntry
implements Serializable, SnmpStandardMetaServer {
static final long serialVersionUID = -7729576810347358025L;
/**
* Constructor for the metadata associated to "JvmRTInputArgsEntry".
*/
public JvmRTInputArgsEntryMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
objectserver = objserv;
varList = new int[1];
varList[0] = 2;
SnmpMibNode.sort(varList);
}
/**
* Get the value of a scalar variable
*/
public SnmpValue get(long var, Object data)
throws SnmpStatusException {
switch((int)var) {
case 2:
return new SnmpString(node.getJvmRTInputArgsItem());
case 1:
throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
/**
* Set the value of a scalar variable
*/
public SnmpValue set(SnmpValue x, long var, Object data)
throws SnmpStatusException {
switch((int)var) {
case 2:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 1:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
/**
* Check the value of a scalar variable
*/
public void check(SnmpValue x, long var, Object data)
throws SnmpStatusException {
switch((int) var) {
case 2:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 1:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
default:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
}
/**
* Allow to bind the metadata description to a specific object.
*/
protected void setInstance(JvmRTInputArgsEntryMBean var) {
node = var;
}
// ------------------------------------------------------------
//
// Implements the "get" method defined in "SnmpMibEntry".
// See the "SnmpMibEntry" Javadoc API for more details.
//
// ------------------------------------------------------------
public void get(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.get(this,req,depth);
}
// ------------------------------------------------------------
//
// Implements the "set" method defined in "SnmpMibEntry".
// See the "SnmpMibEntry" Javadoc API for more details.
//
// ------------------------------------------------------------
public void set(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.set(this,req,depth);
}
// ------------------------------------------------------------
//
// Implements the "check" method defined in "SnmpMibEntry".
// See the "SnmpMibEntry" Javadoc API for more details.
//
// ------------------------------------------------------------
public void check(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.check(this,req,depth);
}
/**
* Returns true if "arc" identifies a scalar object.
*/
public boolean isVariable(long arc) {
switch((int)arc) {
case 2:
case 1:
return true;
default:
break;
}
return false;
}
/**
* Returns true if "arc" identifies a readable scalar object.
*/
public boolean isReadable(long arc) {
switch((int)arc) {
case 2:
return true;
default:
break;
}
return false;
}
// ------------------------------------------------------------
//
// Implements the "skipVariable" method defined in "SnmpMibEntry".
// See the "SnmpMibEntry" Javadoc API for more details.
//
// ------------------------------------------------------------
public boolean skipVariable(long var, Object data, int pduVersion) {
switch((int)var) {
case 1:
return true;
default:
break;
}
return super.skipVariable(var,data,pduVersion);
}
/**
* Return the name of the attribute corresponding to the SNMP variable identified by "id".
*/
public String getAttributeName(long id)
throws SnmpStatusException {
switch((int)id) {
case 2:
return "JvmRTInputArgsItem";
case 1:
return "JvmRTInputArgsIndex";
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
protected JvmRTInputArgsEntryMBean node;
protected SnmpStandardObjectServer objectserver = null;
}

View File

@@ -0,0 +1,265 @@
/*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// java imports
//
import java.io.Serializable;
import java.util.Vector;
// jmx imports
//
import javax.management.MBeanServer;
import javax.management.ObjectName;
import com.sun.jmx.snmp.SnmpCounter;
import com.sun.jmx.snmp.SnmpCounter64;
import com.sun.jmx.snmp.SnmpGauge;
import com.sun.jmx.snmp.SnmpInt;
import com.sun.jmx.snmp.SnmpUnsignedInt;
import com.sun.jmx.snmp.SnmpIpAddress;
import com.sun.jmx.snmp.SnmpTimeticks;
import com.sun.jmx.snmp.SnmpOpaque;
import com.sun.jmx.snmp.SnmpString;
import com.sun.jmx.snmp.SnmpStringFixed;
import com.sun.jmx.snmp.SnmpOid;
import com.sun.jmx.snmp.SnmpNull;
import com.sun.jmx.snmp.SnmpValue;
import com.sun.jmx.snmp.SnmpVarBind;
import com.sun.jmx.snmp.SnmpStatusException;
// jdmk imports
//
import com.sun.jmx.snmp.agent.SnmpIndex;
import com.sun.jmx.snmp.agent.SnmpMib;
import com.sun.jmx.snmp.agent.SnmpMibTable;
import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
/**
* The class is used for implementing the "JvmRTInputArgsTable" group.
* The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.4.20.
*/
public class JvmRTInputArgsTableMeta extends SnmpMibTable implements Serializable {
static final long serialVersionUID = 5395531763015738645L;
/**
* Constructor for the table. Initialize metadata for "JvmRTInputArgsTableMeta".
* The reference on the MBean server is updated so the entries created through an SNMP SET will be AUTOMATICALLY REGISTERED in Java DMK.
*/
public JvmRTInputArgsTableMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
super(myMib);
objectserver = objserv;
}
/**
* Factory method for "JvmRTInputArgsEntry" entry metadata class.
*
* You can redefine this method if you need to replace the default
* generated metadata class with your own customized class.
*
* @param snmpEntryName Name of the SNMP Entry object (conceptual row) ("JvmRTInputArgsEntry")
* @param tableName Name of the table in which the entries are registered ("JvmRTInputArgsTable")
* @param mib The SnmpMib object in which this table is registered
* @param server MBeanServer for this table entries (may be null)
*
* @return An instance of the metadata class generated for the
* "JvmRTInputArgsEntry" conceptual row (JvmRTInputArgsEntryMeta)
*
**/
protected JvmRTInputArgsEntryMeta createJvmRTInputArgsEntryMetaNode(String snmpEntryName, String tableName, SnmpMib mib, MBeanServer server) {
return new JvmRTInputArgsEntryMeta(mib, objectserver);
}
// ------------------------------------------------------------
//
// Implements the "createNewEntry" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public void createNewEntry(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
throws SnmpStatusException {
if (factory != null)
factory.createNewEntry(req, rowOid, depth, this);
else
throw new SnmpStatusException(
SnmpStatusException.snmpRspNoAccess);
}
// ------------------------------------------------------------
//
// Implements the "isRegistrationRequired" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public boolean isRegistrationRequired() {
return false;
}
public void registerEntryNode(SnmpMib mib, MBeanServer server) {
node = createJvmRTInputArgsEntryMetaNode("JvmRTInputArgsEntry", "JvmRTInputArgsTable", mib, server);
}
// ------------------------------------------------------------
//
// Implements the "addEntry" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public synchronized void addEntry(SnmpOid rowOid, ObjectName objname,
Object entry)
throws SnmpStatusException {
if (! (entry instanceof JvmRTInputArgsEntryMBean) )
throw new ClassCastException("Entries for Table \"" +
"JvmRTInputArgsTable" + "\" must implement the \"" +
"JvmRTInputArgsEntryMBean" + "\" interface.");
super.addEntry(rowOid, objname, entry);
}
// ------------------------------------------------------------
//
// Implements the "get" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public void get(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
throws SnmpStatusException {
JvmRTInputArgsEntryMBean entry = (JvmRTInputArgsEntryMBean) getEntry(rowOid);
synchronized (this) {
node.setInstance(entry);
node.get(req,depth);
}
}
// ------------------------------------------------------------
//
// Implements the "set" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public void set(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
throws SnmpStatusException {
if (req.getSize() == 0) return;
JvmRTInputArgsEntryMBean entry = (JvmRTInputArgsEntryMBean) getEntry(rowOid);
synchronized (this) {
node.setInstance(entry);
node.set(req,depth);
}
}
// ------------------------------------------------------------
//
// Implements the "check" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public void check(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
throws SnmpStatusException {
if (req.getSize() == 0) return;
JvmRTInputArgsEntryMBean entry = (JvmRTInputArgsEntryMBean) getEntry(rowOid);
synchronized (this) {
node.setInstance(entry);
node.check(req,depth);
}
}
/**
* check that the given "var" identifies a columnar object.
*/
public void validateVarEntryId( SnmpOid rowOid, long var, Object data )
throws SnmpStatusException {
node.validateVarId(var, data);
}
/**
* Returns true if "var" identifies a readable scalar object.
*/
public boolean isReadableEntryId( SnmpOid rowOid, long var, Object data )
throws SnmpStatusException {
return node.isReadable(var);
}
/**
* Returns the arc of the next columnar object following "var".
*/
public long getNextVarEntryId( SnmpOid rowOid, long var, Object data )
throws SnmpStatusException {
long nextvar = node.getNextVarId(var, data);
while (!isReadableEntryId(rowOid, nextvar, data))
nextvar = node.getNextVarId(nextvar, data);
return nextvar;
}
// ------------------------------------------------------------
//
// Implements the "skipEntryVariable" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public boolean skipEntryVariable( SnmpOid rowOid, long var, Object data, int pduVersion) {
try {
JvmRTInputArgsEntryMBean entry = (JvmRTInputArgsEntryMBean) getEntry(rowOid);
synchronized (this) {
node.setInstance(entry);
return node.skipVariable(var, data, pduVersion);
}
} catch (SnmpStatusException x) {
return false;
}
}
/**
* Reference to the entry metadata.
*/
private JvmRTInputArgsEntryMeta node;
/**
* Reference to the object server.
*/
protected SnmpStandardObjectServer objectserver;
}

View File

@@ -0,0 +1,52 @@
/*
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// jmx imports
//
import com.sun.jmx.snmp.SnmpStatusException;
/**
* This interface is used for representing the remote management interface for the "JvmRTLibraryPathEntry" MBean.
*/
public interface JvmRTLibraryPathEntryMBean {
/**
* Getter for the "JvmRTLibraryPathItem" variable.
*/
public String getJvmRTLibraryPathItem() throws SnmpStatusException;
/**
* Getter for the "JvmRTLibraryPathIndex" variable.
*/
public Integer getJvmRTLibraryPathIndex() throws SnmpStatusException;
}

View File

@@ -0,0 +1,250 @@
/*
* Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// java imports
//
import java.io.Serializable;
// jmx imports
//
import javax.management.MBeanServer;
import com.sun.jmx.snmp.SnmpCounter;
import com.sun.jmx.snmp.SnmpCounter64;
import com.sun.jmx.snmp.SnmpGauge;
import com.sun.jmx.snmp.SnmpInt;
import com.sun.jmx.snmp.SnmpUnsignedInt;
import com.sun.jmx.snmp.SnmpIpAddress;
import com.sun.jmx.snmp.SnmpTimeticks;
import com.sun.jmx.snmp.SnmpOpaque;
import com.sun.jmx.snmp.SnmpString;
import com.sun.jmx.snmp.SnmpStringFixed;
import com.sun.jmx.snmp.SnmpOid;
import com.sun.jmx.snmp.SnmpNull;
import com.sun.jmx.snmp.SnmpValue;
import com.sun.jmx.snmp.SnmpVarBind;
import com.sun.jmx.snmp.SnmpStatusException;
// jdmk imports
//
import com.sun.jmx.snmp.agent.SnmpMibNode;
import com.sun.jmx.snmp.agent.SnmpMib;
import com.sun.jmx.snmp.agent.SnmpMibEntry;
import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
import com.sun.jmx.snmp.agent.SnmpStandardMetaServer;
import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
import com.sun.jmx.snmp.agent.SnmpMibTable;
import com.sun.jmx.snmp.EnumRowStatus;
import com.sun.jmx.snmp.SnmpDefinitions;
/**
* The class is used for representing SNMP metadata for the "JvmRTLibraryPathEntry" group.
* The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.4.23.1.
*/
public class JvmRTLibraryPathEntryMeta extends SnmpMibEntry
implements Serializable, SnmpStandardMetaServer {
static final long serialVersionUID = -5851555586263475792L;
/**
* Constructor for the metadata associated to "JvmRTLibraryPathEntry".
*/
public JvmRTLibraryPathEntryMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
objectserver = objserv;
varList = new int[1];
varList[0] = 2;
SnmpMibNode.sort(varList);
}
/**
* Get the value of a scalar variable
*/
public SnmpValue get(long var, Object data)
throws SnmpStatusException {
switch((int)var) {
case 2:
return new SnmpString(node.getJvmRTLibraryPathItem());
case 1:
throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
/**
* Set the value of a scalar variable
*/
public SnmpValue set(SnmpValue x, long var, Object data)
throws SnmpStatusException {
switch((int)var) {
case 2:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 1:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
/**
* Check the value of a scalar variable
*/
public void check(SnmpValue x, long var, Object data)
throws SnmpStatusException {
switch((int) var) {
case 2:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 1:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
default:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
}
/**
* Allow to bind the metadata description to a specific object.
*/
protected void setInstance(JvmRTLibraryPathEntryMBean var) {
node = var;
}
// ------------------------------------------------------------
//
// Implements the "get" method defined in "SnmpMibEntry".
// See the "SnmpMibEntry" Javadoc API for more details.
//
// ------------------------------------------------------------
public void get(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.get(this,req,depth);
}
// ------------------------------------------------------------
//
// Implements the "set" method defined in "SnmpMibEntry".
// See the "SnmpMibEntry" Javadoc API for more details.
//
// ------------------------------------------------------------
public void set(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.set(this,req,depth);
}
// ------------------------------------------------------------
//
// Implements the "check" method defined in "SnmpMibEntry".
// See the "SnmpMibEntry" Javadoc API for more details.
//
// ------------------------------------------------------------
public void check(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.check(this,req,depth);
}
/**
* Returns true if "arc" identifies a scalar object.
*/
public boolean isVariable(long arc) {
switch((int)arc) {
case 2:
case 1:
return true;
default:
break;
}
return false;
}
/**
* Returns true if "arc" identifies a readable scalar object.
*/
public boolean isReadable(long arc) {
switch((int)arc) {
case 2:
return true;
default:
break;
}
return false;
}
// ------------------------------------------------------------
//
// Implements the "skipVariable" method defined in "SnmpMibEntry".
// See the "SnmpMibEntry" Javadoc API for more details.
//
// ------------------------------------------------------------
public boolean skipVariable(long var, Object data, int pduVersion) {
switch((int)var) {
case 1:
return true;
default:
break;
}
return super.skipVariable(var,data,pduVersion);
}
/**
* Return the name of the attribute corresponding to the SNMP variable identified by "id".
*/
public String getAttributeName(long id)
throws SnmpStatusException {
switch((int)id) {
case 2:
return "JvmRTLibraryPathItem";
case 1:
return "JvmRTLibraryPathIndex";
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
protected JvmRTLibraryPathEntryMBean node;
protected SnmpStandardObjectServer objectserver = null;
}

View File

@@ -0,0 +1,265 @@
/*
* Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// java imports
//
import java.io.Serializable;
import java.util.Vector;
// jmx imports
//
import javax.management.MBeanServer;
import javax.management.ObjectName;
import com.sun.jmx.snmp.SnmpCounter;
import com.sun.jmx.snmp.SnmpCounter64;
import com.sun.jmx.snmp.SnmpGauge;
import com.sun.jmx.snmp.SnmpInt;
import com.sun.jmx.snmp.SnmpUnsignedInt;
import com.sun.jmx.snmp.SnmpIpAddress;
import com.sun.jmx.snmp.SnmpTimeticks;
import com.sun.jmx.snmp.SnmpOpaque;
import com.sun.jmx.snmp.SnmpString;
import com.sun.jmx.snmp.SnmpStringFixed;
import com.sun.jmx.snmp.SnmpOid;
import com.sun.jmx.snmp.SnmpNull;
import com.sun.jmx.snmp.SnmpValue;
import com.sun.jmx.snmp.SnmpVarBind;
import com.sun.jmx.snmp.SnmpStatusException;
// jdmk imports
//
import com.sun.jmx.snmp.agent.SnmpIndex;
import com.sun.jmx.snmp.agent.SnmpMib;
import com.sun.jmx.snmp.agent.SnmpMibTable;
import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
/**
* The class is used for implementing the "JvmRTLibraryPathTable" group.
* The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.4.23.
*/
public class JvmRTLibraryPathTableMeta extends SnmpMibTable implements Serializable {
static final long serialVersionUID = -632403620113109468L;
/**
* Constructor for the table. Initialize metadata for "JvmRTLibraryPathTableMeta".
* The reference on the MBean server is updated so the entries created through an SNMP SET will be AUTOMATICALLY REGISTERED in Java DMK.
*/
public JvmRTLibraryPathTableMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
super(myMib);
objectserver = objserv;
}
/**
* Factory method for "JvmRTLibraryPathEntry" entry metadata class.
*
* You can redefine this method if you need to replace the default
* generated metadata class with your own customized class.
*
* @param snmpEntryName Name of the SNMP Entry object (conceptual row) ("JvmRTLibraryPathEntry")
* @param tableName Name of the table in which the entries are registered ("JvmRTLibraryPathTable")
* @param mib The SnmpMib object in which this table is registered
* @param server MBeanServer for this table entries (may be null)
*
* @return An instance of the metadata class generated for the
* "JvmRTLibraryPathEntry" conceptual row (JvmRTLibraryPathEntryMeta)
*
**/
protected JvmRTLibraryPathEntryMeta createJvmRTLibraryPathEntryMetaNode(String snmpEntryName, String tableName, SnmpMib mib, MBeanServer server) {
return new JvmRTLibraryPathEntryMeta(mib, objectserver);
}
// ------------------------------------------------------------
//
// Implements the "createNewEntry" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public void createNewEntry(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
throws SnmpStatusException {
if (factory != null)
factory.createNewEntry(req, rowOid, depth, this);
else
throw new SnmpStatusException(
SnmpStatusException.snmpRspNoAccess);
}
// ------------------------------------------------------------
//
// Implements the "isRegistrationRequired" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public boolean isRegistrationRequired() {
return false;
}
public void registerEntryNode(SnmpMib mib, MBeanServer server) {
node = createJvmRTLibraryPathEntryMetaNode("JvmRTLibraryPathEntry", "JvmRTLibraryPathTable", mib, server);
}
// ------------------------------------------------------------
//
// Implements the "addEntry" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public synchronized void addEntry(SnmpOid rowOid, ObjectName objname,
Object entry)
throws SnmpStatusException {
if (! (entry instanceof JvmRTLibraryPathEntryMBean) )
throw new ClassCastException("Entries for Table \"" +
"JvmRTLibraryPathTable" + "\" must implement the \"" +
"JvmRTLibraryPathEntryMBean" + "\" interface.");
super.addEntry(rowOid, objname, entry);
}
// ------------------------------------------------------------
//
// Implements the "get" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public void get(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
throws SnmpStatusException {
JvmRTLibraryPathEntryMBean entry = (JvmRTLibraryPathEntryMBean) getEntry(rowOid);
synchronized (this) {
node.setInstance(entry);
node.get(req,depth);
}
}
// ------------------------------------------------------------
//
// Implements the "set" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public void set(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
throws SnmpStatusException {
if (req.getSize() == 0) return;
JvmRTLibraryPathEntryMBean entry = (JvmRTLibraryPathEntryMBean) getEntry(rowOid);
synchronized (this) {
node.setInstance(entry);
node.set(req,depth);
}
}
// ------------------------------------------------------------
//
// Implements the "check" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public void check(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
throws SnmpStatusException {
if (req.getSize() == 0) return;
JvmRTLibraryPathEntryMBean entry = (JvmRTLibraryPathEntryMBean) getEntry(rowOid);
synchronized (this) {
node.setInstance(entry);
node.check(req,depth);
}
}
/**
* check that the given "var" identifies a columnar object.
*/
public void validateVarEntryId( SnmpOid rowOid, long var, Object data )
throws SnmpStatusException {
node.validateVarId(var, data);
}
/**
* Returns true if "var" identifies a readable scalar object.
*/
public boolean isReadableEntryId( SnmpOid rowOid, long var, Object data )
throws SnmpStatusException {
return node.isReadable(var);
}
/**
* Returns the arc of the next columnar object following "var".
*/
public long getNextVarEntryId( SnmpOid rowOid, long var, Object data )
throws SnmpStatusException {
long nextvar = node.getNextVarId(var, data);
while (!isReadableEntryId(rowOid, nextvar, data))
nextvar = node.getNextVarId(nextvar, data);
return nextvar;
}
// ------------------------------------------------------------
//
// Implements the "skipEntryVariable" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public boolean skipEntryVariable( SnmpOid rowOid, long var, Object data, int pduVersion) {
try {
JvmRTLibraryPathEntryMBean entry = (JvmRTLibraryPathEntryMBean) getEntry(rowOid);
synchronized (this) {
node.setInstance(entry);
return node.skipVariable(var, data, pduVersion);
}
} catch (SnmpStatusException x) {
return false;
}
}
/**
* Reference to the entry metadata.
*/
private JvmRTLibraryPathEntryMeta node;
/**
* Reference to the object server.
*/
protected SnmpStandardObjectServer objectserver;
}

View File

@@ -0,0 +1,102 @@
/*
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// jmx imports
//
import com.sun.jmx.snmp.SnmpStatusException;
/**
* This interface is used for representing the remote management interface for the "JvmRuntime" MBean.
*/
public interface JvmRuntimeMBean {
/**
* Getter for the "JvmRTBootClassPathSupport" variable.
*/
public EnumJvmRTBootClassPathSupport getJvmRTBootClassPathSupport() throws SnmpStatusException;
/**
* Getter for the "JvmRTManagementSpecVersion" variable.
*/
public String getJvmRTManagementSpecVersion() throws SnmpStatusException;
/**
* Getter for the "JvmRTSpecVersion" variable.
*/
public String getJvmRTSpecVersion() throws SnmpStatusException;
/**
* Getter for the "JvmRTSpecVendor" variable.
*/
public String getJvmRTSpecVendor() throws SnmpStatusException;
/**
* Getter for the "JvmRTSpecName" variable.
*/
public String getJvmRTSpecName() throws SnmpStatusException;
/**
* Getter for the "JvmRTVMVersion" variable.
*/
public String getJvmRTVMVersion() throws SnmpStatusException;
/**
* Getter for the "JvmRTVMVendor" variable.
*/
public String getJvmRTVMVendor() throws SnmpStatusException;
/**
* Getter for the "JvmRTStartTimeMs" variable.
*/
public Long getJvmRTStartTimeMs() throws SnmpStatusException;
/**
* Getter for the "JvmRTUptimeMs" variable.
*/
public Long getJvmRTUptimeMs() throws SnmpStatusException;
/**
* Getter for the "JvmRTVMName" variable.
*/
public String getJvmRTVMName() throws SnmpStatusException;
/**
* Getter for the "JvmRTName" variable.
*/
public String getJvmRTName() throws SnmpStatusException;
/**
* Getter for the "JvmRTInputArgsCount" variable.
*/
public Integer getJvmRTInputArgsCount() throws SnmpStatusException;
}

View File

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

View File

@@ -0,0 +1,97 @@
/*
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// jmx imports
//
import com.sun.jmx.snmp.SnmpStatusException;
/**
* This interface is used for representing the remote management interface for the "JvmThreadInstanceEntry" MBean.
*/
public interface JvmThreadInstanceEntryMBean {
/**
* Getter for the "JvmThreadInstName" variable.
*/
public String getJvmThreadInstName() throws SnmpStatusException;
/**
* Getter for the "JvmThreadInstCpuTimeNs" variable.
*/
public Long getJvmThreadInstCpuTimeNs() throws SnmpStatusException;
/**
* Getter for the "JvmThreadInstWaitTimeMs" variable.
*/
public Long getJvmThreadInstWaitTimeMs() throws SnmpStatusException;
/**
* Getter for the "JvmThreadInstWaitCount" variable.
*/
public Long getJvmThreadInstWaitCount() throws SnmpStatusException;
/**
* Getter for the "JvmThreadInstBlockTimeMs" variable.
*/
public Long getJvmThreadInstBlockTimeMs() throws SnmpStatusException;
/**
* Getter for the "JvmThreadInstBlockCount" variable.
*/
public Long getJvmThreadInstBlockCount() throws SnmpStatusException;
/**
* Getter for the "JvmThreadInstState" variable.
*/
public Byte[] getJvmThreadInstState() throws SnmpStatusException;
/**
* Getter for the "JvmThreadInstLockOwnerPtr" variable.
*/
public String getJvmThreadInstLockOwnerPtr() throws SnmpStatusException;
/**
* Getter for the "JvmThreadInstId" variable.
*/
public Long getJvmThreadInstId() throws SnmpStatusException;
/**
* Getter for the "JvmThreadInstLockName" variable.
*/
public String getJvmThreadInstLockName() throws SnmpStatusException;
/**
* Getter for the "JvmThreadInstIndex" variable.
*/
public Byte[] getJvmThreadInstIndex() throws SnmpStatusException;
}

View File

@@ -0,0 +1,393 @@
/*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// java imports
//
import java.io.Serializable;
// jmx imports
//
import javax.management.MBeanServer;
import com.sun.jmx.snmp.SnmpCounter;
import com.sun.jmx.snmp.SnmpCounter64;
import com.sun.jmx.snmp.SnmpGauge;
import com.sun.jmx.snmp.SnmpInt;
import com.sun.jmx.snmp.SnmpUnsignedInt;
import com.sun.jmx.snmp.SnmpIpAddress;
import com.sun.jmx.snmp.SnmpTimeticks;
import com.sun.jmx.snmp.SnmpOpaque;
import com.sun.jmx.snmp.SnmpString;
import com.sun.jmx.snmp.SnmpStringFixed;
import com.sun.jmx.snmp.SnmpOid;
import com.sun.jmx.snmp.SnmpNull;
import com.sun.jmx.snmp.SnmpValue;
import com.sun.jmx.snmp.SnmpVarBind;
import com.sun.jmx.snmp.SnmpStatusException;
// jdmk imports
//
import com.sun.jmx.snmp.agent.SnmpMibNode;
import com.sun.jmx.snmp.agent.SnmpMib;
import com.sun.jmx.snmp.agent.SnmpMibEntry;
import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
import com.sun.jmx.snmp.agent.SnmpStandardMetaServer;
import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
import com.sun.jmx.snmp.agent.SnmpMibTable;
import com.sun.jmx.snmp.EnumRowStatus;
import com.sun.jmx.snmp.SnmpDefinitions;
/**
* The class is used for representing SNMP metadata for the "JvmThreadInstanceEntry" group.
* The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.3.10.1.
*/
public class JvmThreadInstanceEntryMeta extends SnmpMibEntry
implements Serializable, SnmpStandardMetaServer {
static final long serialVersionUID = -2015330111801477399L;
/**
* Constructor for the metadata associated to "JvmThreadInstanceEntry".
*/
public JvmThreadInstanceEntryMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
objectserver = objserv;
varList = new int[10];
varList[0] = 9;
varList[1] = 8;
varList[2] = 7;
varList[3] = 6;
varList[4] = 5;
varList[5] = 4;
varList[6] = 3;
varList[7] = 11;
varList[8] = 2;
varList[9] = 10;
SnmpMibNode.sort(varList);
}
/**
* Get the value of a scalar variable
*/
public SnmpValue get(long var, Object data)
throws SnmpStatusException {
switch((int)var) {
case 9:
return new SnmpString(node.getJvmThreadInstName());
case 8:
return new SnmpCounter64(node.getJvmThreadInstCpuTimeNs());
case 7:
return new SnmpCounter64(node.getJvmThreadInstWaitTimeMs());
case 6:
return new SnmpCounter64(node.getJvmThreadInstWaitCount());
case 5:
return new SnmpCounter64(node.getJvmThreadInstBlockTimeMs());
case 4:
return new SnmpCounter64(node.getJvmThreadInstBlockCount());
case 3:
return new SnmpString(node.getJvmThreadInstState());
case 11:
return new SnmpOid(node.getJvmThreadInstLockOwnerPtr());
case 2:
return new SnmpCounter64(node.getJvmThreadInstId());
case 10:
return new SnmpString(node.getJvmThreadInstLockName());
case 1:
throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
/**
* Set the value of a scalar variable
*/
public SnmpValue set(SnmpValue x, long var, Object data)
throws SnmpStatusException {
switch((int)var) {
case 9:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 8:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 7:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 6:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 5:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 4:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 3:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 11:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 2:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 10:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 1:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
/**
* Check the value of a scalar variable
*/
public void check(SnmpValue x, long var, Object data)
throws SnmpStatusException {
switch((int) var) {
case 9:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 8:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 7:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 6:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 5:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 4:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 3:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 11:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 2:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 10:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 1:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
default:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
}
/**
* Allow to bind the metadata description to a specific object.
*/
protected void setInstance(JvmThreadInstanceEntryMBean var) {
node = var;
}
// ------------------------------------------------------------
//
// Implements the "get" method defined in "SnmpMibEntry".
// See the "SnmpMibEntry" Javadoc API for more details.
//
// ------------------------------------------------------------
public void get(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.get(this,req,depth);
}
// ------------------------------------------------------------
//
// Implements the "set" method defined in "SnmpMibEntry".
// See the "SnmpMibEntry" Javadoc API for more details.
//
// ------------------------------------------------------------
public void set(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.set(this,req,depth);
}
// ------------------------------------------------------------
//
// Implements the "check" method defined in "SnmpMibEntry".
// See the "SnmpMibEntry" Javadoc API for more details.
//
// ------------------------------------------------------------
public void check(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.check(this,req,depth);
}
/**
* Returns true if "arc" identifies a scalar object.
*/
public boolean isVariable(long arc) {
switch((int)arc) {
case 9:
case 8:
case 7:
case 6:
case 5:
case 4:
case 3:
case 11:
case 2:
case 10:
case 1:
return true;
default:
break;
}
return false;
}
/**
* Returns true if "arc" identifies a readable scalar object.
*/
public boolean isReadable(long arc) {
switch((int)arc) {
case 9:
case 8:
case 7:
case 6:
case 5:
case 4:
case 3:
case 11:
case 2:
case 10:
return true;
default:
break;
}
return false;
}
// ------------------------------------------------------------
//
// Implements the "skipVariable" method defined in "SnmpMibEntry".
// See the "SnmpMibEntry" Javadoc API for more details.
//
// ------------------------------------------------------------
public boolean skipVariable(long var, Object data, int pduVersion) {
switch((int)var) {
case 8:
case 7:
case 6:
case 5:
case 4:
case 2:
if (pduVersion==SnmpDefinitions.snmpVersionOne) return true;
break;
case 1:
return true;
default:
break;
}
return super.skipVariable(var,data,pduVersion);
}
/**
* Return the name of the attribute corresponding to the SNMP variable identified by "id".
*/
public String getAttributeName(long id)
throws SnmpStatusException {
switch((int)id) {
case 9:
return "JvmThreadInstName";
case 8:
return "JvmThreadInstCpuTimeNs";
case 7:
return "JvmThreadInstWaitTimeMs";
case 6:
return "JvmThreadInstWaitCount";
case 5:
return "JvmThreadInstBlockTimeMs";
case 4:
return "JvmThreadInstBlockCount";
case 3:
return "JvmThreadInstState";
case 11:
return "JvmThreadInstLockOwnerPtr";
case 2:
return "JvmThreadInstId";
case 10:
return "JvmThreadInstLockName";
case 1:
return "JvmThreadInstIndex";
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
protected JvmThreadInstanceEntryMBean node;
protected SnmpStandardObjectServer objectserver = null;
}

View File

@@ -0,0 +1,265 @@
/*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// java imports
//
import java.io.Serializable;
import java.util.Vector;
// jmx imports
//
import javax.management.MBeanServer;
import javax.management.ObjectName;
import com.sun.jmx.snmp.SnmpCounter;
import com.sun.jmx.snmp.SnmpCounter64;
import com.sun.jmx.snmp.SnmpGauge;
import com.sun.jmx.snmp.SnmpInt;
import com.sun.jmx.snmp.SnmpUnsignedInt;
import com.sun.jmx.snmp.SnmpIpAddress;
import com.sun.jmx.snmp.SnmpTimeticks;
import com.sun.jmx.snmp.SnmpOpaque;
import com.sun.jmx.snmp.SnmpString;
import com.sun.jmx.snmp.SnmpStringFixed;
import com.sun.jmx.snmp.SnmpOid;
import com.sun.jmx.snmp.SnmpNull;
import com.sun.jmx.snmp.SnmpValue;
import com.sun.jmx.snmp.SnmpVarBind;
import com.sun.jmx.snmp.SnmpStatusException;
// jdmk imports
//
import com.sun.jmx.snmp.agent.SnmpIndex;
import com.sun.jmx.snmp.agent.SnmpMib;
import com.sun.jmx.snmp.agent.SnmpMibTable;
import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
/**
* The class is used for implementing the "JvmThreadInstanceTable" group.
* The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.3.10.
*/
public class JvmThreadInstanceTableMeta extends SnmpMibTable implements Serializable {
static final long serialVersionUID = 2519514732589115954L;
/**
* Constructor for the table. Initialize metadata for "JvmThreadInstanceTableMeta".
* The reference on the MBean server is updated so the entries created through an SNMP SET will be AUTOMATICALLY REGISTERED in Java DMK.
*/
public JvmThreadInstanceTableMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
super(myMib);
objectserver = objserv;
}
/**
* Factory method for "JvmThreadInstanceEntry" entry metadata class.
*
* You can redefine this method if you need to replace the default
* generated metadata class with your own customized class.
*
* @param snmpEntryName Name of the SNMP Entry object (conceptual row) ("JvmThreadInstanceEntry")
* @param tableName Name of the table in which the entries are registered ("JvmThreadInstanceTable")
* @param mib The SnmpMib object in which this table is registered
* @param server MBeanServer for this table entries (may be null)
*
* @return An instance of the metadata class generated for the
* "JvmThreadInstanceEntry" conceptual row (JvmThreadInstanceEntryMeta)
*
**/
protected JvmThreadInstanceEntryMeta createJvmThreadInstanceEntryMetaNode(String snmpEntryName, String tableName, SnmpMib mib, MBeanServer server) {
return new JvmThreadInstanceEntryMeta(mib, objectserver);
}
// ------------------------------------------------------------
//
// Implements the "createNewEntry" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public void createNewEntry(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
throws SnmpStatusException {
if (factory != null)
factory.createNewEntry(req, rowOid, depth, this);
else
throw new SnmpStatusException(
SnmpStatusException.snmpRspNoAccess);
}
// ------------------------------------------------------------
//
// Implements the "isRegistrationRequired" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public boolean isRegistrationRequired() {
return false;
}
public void registerEntryNode(SnmpMib mib, MBeanServer server) {
node = createJvmThreadInstanceEntryMetaNode("JvmThreadInstanceEntry", "JvmThreadInstanceTable", mib, server);
}
// ------------------------------------------------------------
//
// Implements the "addEntry" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public synchronized void addEntry(SnmpOid rowOid, ObjectName objname,
Object entry)
throws SnmpStatusException {
if (! (entry instanceof JvmThreadInstanceEntryMBean) )
throw new ClassCastException("Entries for Table \"" +
"JvmThreadInstanceTable" + "\" must implement the \"" +
"JvmThreadInstanceEntryMBean" + "\" interface.");
super.addEntry(rowOid, objname, entry);
}
// ------------------------------------------------------------
//
// Implements the "get" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public void get(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
throws SnmpStatusException {
JvmThreadInstanceEntryMBean entry = (JvmThreadInstanceEntryMBean) getEntry(rowOid);
synchronized (this) {
node.setInstance(entry);
node.get(req,depth);
}
}
// ------------------------------------------------------------
//
// Implements the "set" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public void set(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
throws SnmpStatusException {
if (req.getSize() == 0) return;
JvmThreadInstanceEntryMBean entry = (JvmThreadInstanceEntryMBean) getEntry(rowOid);
synchronized (this) {
node.setInstance(entry);
node.set(req,depth);
}
}
// ------------------------------------------------------------
//
// Implements the "check" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public void check(SnmpMibSubRequest req, SnmpOid rowOid, int depth)
throws SnmpStatusException {
if (req.getSize() == 0) return;
JvmThreadInstanceEntryMBean entry = (JvmThreadInstanceEntryMBean) getEntry(rowOid);
synchronized (this) {
node.setInstance(entry);
node.check(req,depth);
}
}
/**
* check that the given "var" identifies a columnar object.
*/
public void validateVarEntryId( SnmpOid rowOid, long var, Object data )
throws SnmpStatusException {
node.validateVarId(var, data);
}
/**
* Returns true if "var" identifies a readable scalar object.
*/
public boolean isReadableEntryId( SnmpOid rowOid, long var, Object data )
throws SnmpStatusException {
return node.isReadable(var);
}
/**
* Returns the arc of the next columnar object following "var".
*/
public long getNextVarEntryId( SnmpOid rowOid, long var, Object data )
throws SnmpStatusException {
long nextvar = node.getNextVarId(var, data);
while (!isReadableEntryId(rowOid, nextvar, data))
nextvar = node.getNextVarId(nextvar, data);
return nextvar;
}
// ------------------------------------------------------------
//
// Implements the "skipEntryVariable" method defined in "SnmpMibTable".
// See the "SnmpMibTable" Javadoc API for more details.
//
// ------------------------------------------------------------
public boolean skipEntryVariable( SnmpOid rowOid, long var, Object data, int pduVersion) {
try {
JvmThreadInstanceEntryMBean entry = (JvmThreadInstanceEntryMBean) getEntry(rowOid);
synchronized (this) {
node.setInstance(entry);
return node.skipVariable(var, data, pduVersion);
}
} catch (SnmpStatusException x) {
return false;
}
}
/**
* Reference to the entry metadata.
*/
private JvmThreadInstanceEntryMeta node;
/**
* Reference to the object server.
*/
protected SnmpStandardObjectServer objectserver;
}

View File

@@ -0,0 +1,107 @@
/*
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// jmx imports
//
import com.sun.jmx.snmp.SnmpStatusException;
/**
* This interface is used for representing the remote management interface for the "JvmThreading" MBean.
*/
public interface JvmThreadingMBean {
/**
* Getter for the "JvmThreadCpuTimeMonitoring" variable.
*/
public EnumJvmThreadCpuTimeMonitoring getJvmThreadCpuTimeMonitoring() throws SnmpStatusException;
/**
* Setter for the "JvmThreadCpuTimeMonitoring" variable.
*/
public void setJvmThreadCpuTimeMonitoring(EnumJvmThreadCpuTimeMonitoring x) throws SnmpStatusException;
/**
* Checker for the "JvmThreadCpuTimeMonitoring" variable.
*/
public void checkJvmThreadCpuTimeMonitoring(EnumJvmThreadCpuTimeMonitoring x) throws SnmpStatusException;
/**
* Getter for the "JvmThreadContentionMonitoring" variable.
*/
public EnumJvmThreadContentionMonitoring getJvmThreadContentionMonitoring() throws SnmpStatusException;
/**
* Setter for the "JvmThreadContentionMonitoring" variable.
*/
public void setJvmThreadContentionMonitoring(EnumJvmThreadContentionMonitoring x) throws SnmpStatusException;
/**
* Checker for the "JvmThreadContentionMonitoring" variable.
*/
public void checkJvmThreadContentionMonitoring(EnumJvmThreadContentionMonitoring x) throws SnmpStatusException;
/**
* Getter for the "JvmThreadTotalStartedCount" variable.
*/
public Long getJvmThreadTotalStartedCount() throws SnmpStatusException;
/**
* Getter for the "JvmThreadPeakCount" variable.
*/
public Long getJvmThreadPeakCount() throws SnmpStatusException;
/**
* Getter for the "JvmThreadDaemonCount" variable.
*/
public Long getJvmThreadDaemonCount() throws SnmpStatusException;
/**
* Getter for the "JvmThreadCount" variable.
*/
public Long getJvmThreadCount() throws SnmpStatusException;
/**
* Getter for the "JvmThreadPeakCountReset" variable.
*/
public Long getJvmThreadPeakCountReset() throws SnmpStatusException;
/**
* Setter for the "JvmThreadPeakCountReset" variable.
*/
public void setJvmThreadPeakCountReset(Long x) throws SnmpStatusException;
/**
* Checker for the "JvmThreadPeakCountReset" variable.
*/
public void checkJvmThreadPeakCountReset(Long x) throws SnmpStatusException;
}

View File

@@ -0,0 +1,455 @@
/*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.management.snmp.jvmmib;
//
// Generated by mibgen version 5.0 (06/02/03) when compiling JVM-MANAGEMENT-MIB in standard metadata mode.
//
// java imports
//
import java.io.Serializable;
// jmx imports
//
import javax.management.MBeanServer;
import com.sun.jmx.snmp.SnmpCounter;
import com.sun.jmx.snmp.SnmpCounter64;
import com.sun.jmx.snmp.SnmpGauge;
import com.sun.jmx.snmp.SnmpInt;
import com.sun.jmx.snmp.SnmpUnsignedInt;
import com.sun.jmx.snmp.SnmpIpAddress;
import com.sun.jmx.snmp.SnmpTimeticks;
import com.sun.jmx.snmp.SnmpOpaque;
import com.sun.jmx.snmp.SnmpString;
import com.sun.jmx.snmp.SnmpStringFixed;
import com.sun.jmx.snmp.SnmpOid;
import com.sun.jmx.snmp.SnmpNull;
import com.sun.jmx.snmp.SnmpValue;
import com.sun.jmx.snmp.SnmpVarBind;
import com.sun.jmx.snmp.SnmpStatusException;
// jdmk imports
//
import com.sun.jmx.snmp.agent.SnmpMib;
import com.sun.jmx.snmp.agent.SnmpMibGroup;
import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
import com.sun.jmx.snmp.agent.SnmpStandardMetaServer;
import com.sun.jmx.snmp.agent.SnmpMibSubRequest;
import com.sun.jmx.snmp.agent.SnmpMibTable;
import com.sun.jmx.snmp.EnumRowStatus;
import com.sun.jmx.snmp.SnmpDefinitions;
/**
* The class is used for representing SNMP metadata for the "JvmThreading" group.
* The group is defined with the following oid: 1.3.6.1.4.1.42.2.145.3.163.1.1.3.
*/
public class JvmThreadingMeta extends SnmpMibGroup
implements Serializable, SnmpStandardMetaServer {
static final long serialVersionUID = 5223833578005322854L;
/**
* Constructor for the metadata associated to "JvmThreading".
*/
public JvmThreadingMeta(SnmpMib myMib, SnmpStandardObjectServer objserv) {
objectserver = objserv;
try {
registerObject(6);
registerObject(5);
registerObject(4);
registerObject(3);
registerObject(2);
registerObject(1);
registerObject(10);
registerObject(7);
} catch (IllegalAccessException e) {
throw new RuntimeException(e.getMessage());
}
}
/**
* Get the value of a scalar variable
*/
public SnmpValue get(long var, Object data)
throws SnmpStatusException {
switch((int)var) {
case 6:
return new SnmpInt(node.getJvmThreadCpuTimeMonitoring());
case 5:
return new SnmpInt(node.getJvmThreadContentionMonitoring());
case 4:
return new SnmpCounter64(node.getJvmThreadTotalStartedCount());
case 3:
return new SnmpCounter(node.getJvmThreadPeakCount());
case 2:
return new SnmpGauge(node.getJvmThreadDaemonCount());
case 1:
return new SnmpGauge(node.getJvmThreadCount());
case 10: {
throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
}
case 7:
return new SnmpCounter64(node.getJvmThreadPeakCountReset());
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
/**
* Set the value of a scalar variable
*/
public SnmpValue set(SnmpValue x, long var, Object data)
throws SnmpStatusException {
switch((int)var) {
case 6:
if (x instanceof SnmpInt) {
try {
node.setJvmThreadCpuTimeMonitoring( new EnumJvmThreadCpuTimeMonitoring (((SnmpInt)x).toInteger()));
} catch(IllegalArgumentException e) {
throw new SnmpStatusException(SnmpStatusException.snmpRspWrongValue);
}
return new SnmpInt(node.getJvmThreadCpuTimeMonitoring());
} else {
throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
}
case 5:
if (x instanceof SnmpInt) {
try {
node.setJvmThreadContentionMonitoring( new EnumJvmThreadContentionMonitoring (((SnmpInt)x).toInteger()));
} catch(IllegalArgumentException e) {
throw new SnmpStatusException(SnmpStatusException.snmpRspWrongValue);
}
return new SnmpInt(node.getJvmThreadContentionMonitoring());
} else {
throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
}
case 4:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 3:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 2:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 1:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 10: {
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
case 7:
if (x instanceof SnmpCounter64) {
node.setJvmThreadPeakCountReset(((SnmpCounter64)x).toLong());
return new SnmpCounter64(node.getJvmThreadPeakCountReset());
} else {
throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
}
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
/**
* Check the value of a scalar variable
*/
public void check(SnmpValue x, long var, Object data)
throws SnmpStatusException {
switch((int) var) {
case 6:
if (x instanceof SnmpInt) {
try {
node.checkJvmThreadCpuTimeMonitoring( new EnumJvmThreadCpuTimeMonitoring (((SnmpInt)x).toInteger()));
} catch(IllegalArgumentException e) {
throw new SnmpStatusException(SnmpStatusException.snmpRspWrongValue);
}
} else {
throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
}
break;
case 5:
if (x instanceof SnmpInt) {
try {
node.checkJvmThreadContentionMonitoring( new EnumJvmThreadContentionMonitoring (((SnmpInt)x).toInteger()));
} catch(IllegalArgumentException e) {
throw new SnmpStatusException(SnmpStatusException.snmpRspWrongValue);
}
} else {
throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
}
break;
case 4:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 3:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 2:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 1:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
case 10: {
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
case 7:
if (x instanceof SnmpCounter64) {
node.checkJvmThreadPeakCountReset(((SnmpCounter64)x).toLong());
} else {
throw new SnmpStatusException(SnmpStatusException.snmpRspWrongType);
}
break;
default:
throw new SnmpStatusException(SnmpStatusException.snmpRspNotWritable);
}
}
/**
* Allow to bind the metadata description to a specific object.
*/
protected void setInstance(JvmThreadingMBean var) {
node = var;
}
// ------------------------------------------------------------
//
// Implements the "get" method defined in "SnmpMibGroup".
// See the "SnmpMibGroup" Javadoc API for more details.
//
// ------------------------------------------------------------
public void get(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.get(this,req,depth);
}
// ------------------------------------------------------------
//
// Implements the "set" method defined in "SnmpMibGroup".
// See the "SnmpMibGroup" Javadoc API for more details.
//
// ------------------------------------------------------------
public void set(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.set(this,req,depth);
}
// ------------------------------------------------------------
//
// Implements the "check" method defined in "SnmpMibGroup".
// See the "SnmpMibGroup" Javadoc API for more details.
//
// ------------------------------------------------------------
public void check(SnmpMibSubRequest req, int depth)
throws SnmpStatusException {
objectserver.check(this,req,depth);
}
/**
* Returns true if "arc" identifies a scalar object.
*/
public boolean isVariable(long arc) {
switch((int)arc) {
case 6:
case 5:
case 4:
case 3:
case 2:
case 1:
case 7:
return true;
default:
break;
}
return false;
}
/**
* Returns true if "arc" identifies a readable scalar object.
*/
public boolean isReadable(long arc) {
switch((int)arc) {
case 6:
case 5:
case 4:
case 3:
case 2:
case 1:
case 7:
return true;
default:
break;
}
return false;
}
// ------------------------------------------------------------
//
// Implements the "skipVariable" method defined in "SnmpMibGroup".
// See the "SnmpMibGroup" Javadoc API for more details.
//
// ------------------------------------------------------------
public boolean skipVariable(long var, Object data, int pduVersion) {
switch((int)var) {
case 4:
case 7:
if (pduVersion==SnmpDefinitions.snmpVersionOne) return true;
break;
default:
break;
}
return super.skipVariable(var,data,pduVersion);
}
/**
* Return the name of the attribute corresponding to the SNMP variable identified by "id".
*/
public String getAttributeName(long id)
throws SnmpStatusException {
switch((int)id) {
case 6:
return "JvmThreadCpuTimeMonitoring";
case 5:
return "JvmThreadContentionMonitoring";
case 4:
return "JvmThreadTotalStartedCount";
case 3:
return "JvmThreadPeakCount";
case 2:
return "JvmThreadDaemonCount";
case 1:
return "JvmThreadCount";
case 10: {
throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
}
case 7:
return "JvmThreadPeakCountReset";
default:
break;
}
throw new SnmpStatusException(SnmpStatusException.noSuchObject);
}
/**
* Returns true if "arc" identifies a table object.
*/
public boolean isTable(long arc) {
switch((int)arc) {
case 10:
return true;
default:
break;
}
return false;
}
/**
* Returns the table object identified by "arc".
*/
public SnmpMibTable getTable(long arc) {
switch((int)arc) {
case 10:
return tableJvmThreadInstanceTable;
default:
break;
}
return null;
}
/**
* Register the group's SnmpMibTable objects with the meta-data.
*/
public void registerTableNodes(SnmpMib mib, MBeanServer server) {
tableJvmThreadInstanceTable = createJvmThreadInstanceTableMetaNode("JvmThreadInstanceTable", "JvmThreading", mib, server);
if ( tableJvmThreadInstanceTable != null) {
tableJvmThreadInstanceTable.registerEntryNode(mib,server);
mib.registerTableMeta("JvmThreadInstanceTable", tableJvmThreadInstanceTable);
}
}
/**
* Factory method for "JvmThreadInstanceTable" table metadata class.
*
* You can redefine this method if you need to replace the default
* generated metadata class with your own customized class.
*
* @param tableName Name of the table object ("JvmThreadInstanceTable")
* @param groupName Name of the group to which this table belong ("JvmThreading")
* @param mib The SnmpMib object in which this table is registered
* @param server MBeanServer for this table entries (may be null)
*
* @return An instance of the metadata class generated for the
* "JvmThreadInstanceTable" table (JvmThreadInstanceTableMeta)
*
**/
protected JvmThreadInstanceTableMeta createJvmThreadInstanceTableMetaNode(String tableName, String groupName, SnmpMib mib, MBeanServer server) {
return new JvmThreadInstanceTableMeta(mib, objectserver);
}
protected JvmThreadingMBean node;
protected SnmpStandardObjectServer objectserver = null;
protected JvmThreadInstanceTableMeta tableJvmThreadInstanceTable = null;
}