Examples of AgentXGetBulkPDU


Examples of org.snmp4j.agent.agentx.AgentXGetBulkPDU

    }

    private int getRepeaterCount() {
      AgentXPDU pdu = requestEvent.getCommand();
      if (pdu instanceof AgentXGetBulkPDU) {
        AgentXGetBulkPDU bulkPDU = (AgentXGetBulkPDU)pdu;
        return Math.max(bulkPDU.size() - bulkPDU.getNonRepeaters(), 0);
      }
      return 0;
    }
View Full Code Here

Examples of org.snmp4j.agent.agentx.AgentXGetBulkPDU

    }

    public boolean hasNext() {
      AgentXPDU reqPDU = requestEvent.getCommand();
      if (reqPDU.getType() == AgentXPDU.AGENTX_GETBULK_PDU) {
        AgentXGetBulkPDU bulkPDU = (AgentXGetBulkPDU)reqPDU;
        if (cursor < Math.min(bulkPDU.size(), bulkPDU.getNonRepeaters())) {
          return true;
        }
        else {
          if (cursor < bulkPDU.getNonRepeaters() +
              bulkPDU.getMaxRepetitions() * getRepeaterCount()) {
            List lastRow = lastRow();
            if (lastRow != null) {
              boolean allEndOfMibView = true;
              for (Iterator it = lastRow.iterator(); it.hasNext();) {
                SubRequest sreq = (SubRequest) it.next();
View Full Code Here

Examples of org.snmp4j.agent.agentx.AgentXGetBulkPDU

    }

    public SubRequestIterator repetitions() {
      initSubRequests();
      if (requestEvent.getCommand().getType() == AgentXPDU.AGENTX_GETBULK_PDU) {
        AgentXGetBulkPDU getBulk = (AgentXGetBulkPDU) requestEvent.getCommand();
        int repeaters = getBulk.size() - getBulk.getNonRepeaters();
        return new AgentXSubRequestIterator(getIndex(), repeaters);
      }
      return new SubRequestIteratorSupport(Collections.EMPTY_LIST.iterator());
    }
View Full Code Here

Examples of org.snmp4j.agent.agentx.AgentXGetBulkPDU

    PDU requestPDU = request.getInitiatingEvent().getPDU();
    switch (requestPDU.getType()) {
      case PDU.GETBULK: {
        short maxRep = getMaxRepetitions(request, requestPDU);
        agentXRequestPDU =
            new AgentXGetBulkPDU(request.getContext(),
                                 maxRep, nonRepeater,
                                 (MOScope[]) searchRanges.toArray(
                                     new MOScope[searchRanges.size()]));
        break;
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.