All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.jaw.tools.MibGen

java.lang.Object
   |
   +----com.sun.jaw.tools.MibGen

public final class MibGen
extends Object
implements Runnable
The class compiles a SNMP MIB expressed using SNMP V1 or SNMP V2 SMI and generates code for implementing the MIB as a set of Java BeansTM.

The compiler accepts SNMPv1 or SNMPv2 definitions mixted into a same MIB module. A MIB file can contain several MIB modules.

In order to invoke the class, you need to invoke:

where: In order to directly invoke the class, Java Dynamic Management provides a script called mibgen.
On Solaris the script is provided under $(PACKAGE_ROOT)/jaw/bin. If you use default install path the script is here.


Constructor Index

 o MibGen(OutputStream, String, String[])
Create a new MIB compiler.

Method Index

 o getCompilationStatus()
Indicates compilation status.
 o main(String[])
Static invocation of MibGen.
 o run()
Start compilation.

Constructors

 o MibGen
 public MibGen(OutputStream o,
               String prog,
               String args[])
Create a new MIB compiler.

Parameters:
o - Output stream to use for printing traces
prog - Command name to use when printing messages
args - Command arguments.

Methods

 o getCompilationStatus
 public int getCompilationStatus()
Indicates compilation status. Once the compilation is performed, the method indicates whether or not the compilation was successful.

Returns:
0 if the compilation was successful or 0 if an error occured.
 o run
 public void run()
Start compilation.

 o main
 public static void main(String args[])
Static invocation of MibGen. The method creates an instance of MibGen and invokes the compiler. If an error occurs, the method exits the VM with a status of 1.
If the compilation succeeds, the method exits the VM with a status of 0.


All Packages  Class Hierarchy  This Package  Previous  Next  Index