public SNMPSequence processGetNextRequest(SNMPPDU requestPDU, String communityName) throws SNMPGetException
    {
        SNMPSequence varBindList = requestPDU.getVarBindList();
        SNMPSequence responseList = new SNMPSequence();
        byte pduType = requestPDU.getPDUType();

        for (int i = 0; i < varBindList.size(); i++)
        {
            SNMPSequence variablePair = (SNMPSequence )varBindList.getSNMPObjectAt(i);
            SNMPObjectIdentifier snmpOID = (SNMPObjectIdentifier) variablePair.getSNMPObjectAt(0);
            String snmpOIDStr = snmpOID.toString();

            // check to see if supplied community name is ours; if not, we'll just silently
            // ignore the request by not returning anything
            if (!communityName.equals(this.communityName))
            {
                continue;
            }

            if (pduType == SNMPBERCodec.SNMPGETNEXTREQUEST)
            {
                int index;

                for (index = 0; index < SNMP_DATABASE.length; index++)
                {
                    String oid = (String) SNMP_DATABASE[index][0];
                    if (oid.startsWith(snmpOIDStr))
                        break;
                }

                if (index < SNMP_DATABASE.length - 1)
                {
                    if (snmpOIDStr.length() == ((String) SNMP_DATABASE[index][0]).length())
                        index++;

                    try
                    {
                        if (index < SNMP_DATABASE.length)
                        {
                            String nextOIDStr = (String) SNMP_DATABASE[index][0];
                            // create SNMPVariablePair for the next OID and its value
                            SNMPObjectIdentifier nextOID = new SNMPObjectIdentifier(nextOIDStr);
                            SNMPVariablePair innerPair = new SNMPVariablePair(nextOID, getSnmpOIDValue(nextOIDStr));

                            // now create a pair containing the supplied OID and the variable pair containing the following
                            // OID and its value; this allows the ANMPv1AgentInterface to know which of the supplied OIDs
                            // the new OID corresponds to (follows).
                            SNMPVariablePair outerPair = new SNMPVariablePair(snmpOID, innerPair);

                            // add the "compound" SNMPVariablePair to the response list
                            responseList.addSNMPObject(outerPair);
                        }
                    }
                    catch (SNMPBadValueException e)
                    {
                        e.printStackTrace();
                    }

                }
            }
        }

        return responseList;
    }