Java Dynamic Management Kit 5.1 Tools Reference Guide

1.5 Classes Representing SNMP Groups

For each SNMP group defined in the MIB, the mibgen compiler generates:

1.5.1 Skeletal MBeans Representing Groups

The mibgen compiler generates an MBean for each group that is defined in the MIB. These skeletal MBeans need to be completed by adding implementation-specific code, to provide access methods. The generated code is initialized with default values for the various MIB variables. If the MIB specifies a default value for an SNMP variable, this value is used to initialize the corresponding variable in the MBean skeleton. Therefore, if you compile the generated code directly, you obtain a running agent. In this case, values returned by the agent when querying the MIBs will be default values or meaningless values, if no default value has been provided in the MIB file for the variable.

The mibgen compiler uses the group names specified in the MIB definition to name MBeans that are generated from groups.

1.5.2 Metadata Files

In addition to generating skeletal MBeans to represent each group, the mibgen compiler generates a metadata file. The metadata file contains Java source code that provides the SNMP view of the MBean. Metadata files do not need to be modified. For metadata files, the Meta suffix is added.