* The method takes the incoming requests and split it into subrequests.
*/
private void splitRequest(SnmpPduRequest req) {
int nbAgents= mibs.size();
SnmpMibAgent agent = mibs.firstElement();
if (nbAgents == 1) {
// Take all the oids contained in the request and
//
subs.put(agent, new SnmpSubRequestHandler(agent, req, true));
return;
}
// For the get next operation we are going to send the varbind list
// to all agents
//
if (req.type == pduGetNextRequestPdu) {
for(Enumeration<SnmpMibAgent> e= mibs.elements(); e.hasMoreElements(); ) {
final SnmpMibAgent ag= e.nextElement();
subs.put(ag, new SnmpSubNextRequestHandler(adaptor, ag, req));
}
return;
}