The Java Dynamic Management Kit provides a toolkit for developing SNMP agents and managers. This includes:
an SNMP agent toolkit
Developing An SNMP Agent
SNMP MIB Compiler -- mibgen
SNMP Protocol Adaptor
SNMP Manager API
Developing an SMNP Agent using the Java Dynamic Management Kit involves three steps:
Generating Java code by running mibgen on the target SNMP MIB
Filling in the access operations in the generated Java code
Configuring the SNMP adaptor with the target MIB
mibgen parses an SNMP MIB and generates the following:
an MBean representing the whole MIB
a class representing the metadata definitions for the MIB variables
classes representing SNMP groups/entries as MBeans (and a metadata class for each instance generated)
classes representing SNMP tables
classes representing SNMP enumerated types
MBeans generated by mibgen need to be updated to provide the definitive implementation.
SNMP agents developed with the Java Dynamic Management Kit are extensible in that MIBs can be added or removed during an agent's lifetime. They are open as SNMP is not the only protocol available and HTTP, HTML and RMI protocol adaptors can also be used to access the agent. They can be SNMP-only because the SNMP adaptor can be used alone and the MBean server is not mandatory.
For more information regarding this development process, please refer to the Java Dynamic Management Kit Tools Reference Guide.
The mibgen compiler takes as input a set of SNMP MIBs and generates standard MBeans that implement the MIBs. MIBs can be expressed using SNMP v1 or SNMP v2 syntax.
The mibgen compiler is able to process:
Tables with cross references indexed across several MIBs
MIBs that contain both v1 and v2 definitions
The mibgen compiler also generates the Java source code required for representing a whole MIB in an SNMP manager. Table objects provide methods for adding and removing entries from the table.
When the whole MIB file is registered in the MBean server, all the associated groups are automatically instantiated and added to the MBean server.
The SNMP adaptor implements the SNMP v1 and v2 protocol stack. The protocol adaptor is able to manage an unlimited number of different Management Information Bases, commonly referred to as MIBs. By providing a unified view of all the MIBs, the SNMP adaptor solves the subagent problem that commonly occurs with SNMP. The SNMP protocol adaptor allows MIBs to be loaded or unloaded dynamically. This enables a MIB to be loaded into, updated, and unloaded from an agent while it is running.
The SNMP manager API is a set of Java classes that simplifies the development of applications for managing SNMP agents. The agents may be developed using the Java Dynamic Management Kit, or by other means.