This topic describes the basic steps used to communicate with SNMP agents from either the IBM Director Server or Console.
In order to start communicating with SNMP agents in Director, a console task will have to first create a TWGRemoteSNMP object. If the user wishes to send SNMPv2 PDUs, then they must specify version 2 in the constructor or through the setVersion method. The SNMP request available for use are Get, GetNext, Set, GetBulk, and Inform. GetBulk and Inform work for SNMPv2 only.
The classes used for SNMP development and integration are:
All responses to a PDU are passed to the TWGRemoteSNMPResponse implementation given in the request call (Get, Set, etc.). If a valid request call initiates a response, then a appropriate method will be called (GetResponse for sendGetRequest, SetResponse for sendSetRequest, etc.).
The TWGRemoteSNMP class was designed for use with console task, hence the required managed object id as the target. In order to send a PDU, all calls require at least the target moid, a TWGRemoteSNMPResponse object to callback, and a set of object ids or variable bindings.
For example, a response to a sendGetRequest will call TWGRemoteSNMPResponse.GetResponse with a array of VariableBindings. Each variable binding object contains an instance of one of it's subclasses.
In order to process the response correctly, a developer must check for the instance of one of the variableBind subclasses.
The possibilities include: