private void splitRequest(SnmpPduRequest req){
  int nbAgents=mibs.size();
  SnmpMibAgent agent=mibs.firstElement();
  if (nbAgents == 1) {
    subs.put(agent,new SnmpSubRequestHandler(agent,req,true));
    return;
  }
  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;
  }
  int nbReqs=req.varBindList.length;
  SnmpVarBind[] vars=req.varBindList;
  SnmpSubRequestHandler sub;
  for (int i=0; i < nbReqs; i++) {
    agent=root.getAgentMib(vars[i].oid);
    sub=subs.get(agent);
    if (sub == null) {
      sub=new SnmpSubRequestHandler(agent,req);
      subs.put(agent,sub);
    }
    sub.updateRequest(vars[i],i);
  }
}

private void splitRequest ( SnmpPduRequest req ) { int nbAgents = mibs . size ( ) ; SnmpMibAgent agent = mibs . firstElement ( ) ; if ( nbAgents == 1 ) { subs . put ( agent , new SnmpSubRequestHandler ( agent , req , true ) ) ; return ; } 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 ; } int nbReqs = req . varBindList . length ; SnmpVarBind [ ] vars = req . varBindList ; SnmpSubRequestHandler sub ; for ( int i = 0 ; i < nbReqs ; i ++ ) { agent = root . getAgentMib ( vars [ i ] . oid ) ; sub = subs . get ( agent ) ; if ( sub == null ) { sub = new SnmpSubRequestHandler ( agent , req ) ; subs . put ( agent , sub ) ; } sub . updateRequest ( vars [ i ] , i ) ; } }
the method takes the incoming requests and split it into subrequests .
