Package org.snmp4j.agent.request

Examples of org.snmp4j.agent.request.SubRequest


    MOQuery query = new DefaultMOQuery(scope, false, this);
    ManagedObject mo = server.lookup(query);
    if (mo != null) {
      final VariableBinding vb = new VariableBinding(oid);
      final RequestStatus status = new RequestStatus();
      SubRequest req = new SubRequest() {
        private boolean completed;
        private MOQuery query;

        public boolean hasError() {
          return false;
View Full Code Here


  public boolean isPhaseComplete() {
    if (errorStatus == SnmpConstants.SNMP_ERROR_SUCCESS) {
      initSubRequests();
      for (Iterator it = subrequests.iterator(); it.hasNext(); ) {
        SubRequest subreq = (SubRequest) it.next();
        RequestStatus status = subreq.getStatus();
        if (status.getErrorStatus() != SnmpConstants.SNMP_ERROR_SUCCESS) {
          return true;
        }
        else if (!status.isPhaseComplete()) {
          return false;
View Full Code Here

              bulkPDU.getMaxRepetitions() * getRepeaterCount()) {
            List lastRow = lastRow();
            if (lastRow != null) {
              boolean allEndOfMibView = true;
              for (Iterator it = lastRow.iterator(); it.hasNext();) {
                SubRequest sreq = (SubRequest) it.next();
                if (sreq.getVariableBinding().getSyntax() !=
                    SMIConstants.EXCEPTION_END_OF_MIB_VIEW) {
                  allEndOfMibView = false;
                  break;
                }
              }
View Full Code Here

          (cursor >= subrequests.size())) {
        while (cursor >= subrequests.size()) {
          addRepeaterSubRequest();
        }
      }
      SubRequest sreq = (SubRequest) subrequests.get(cursor);
      cursor += increment;
      return sreq;
    }
View Full Code Here

    if (queue.add(searchRange, activeReg, request.getIndex() >= nonRepeaters)) {
      if (((SnmpRequest)request.getRequest())
          .getInitiatingEvent().getPDU().getType() == PDU.GETBULK) {
        // need to set also repetitions to processed
        for (SubRequestIterator it = request.repetitions(); it.hasNext(); ) {
          SubRequest sreq = it.nextSubRequest();
          sreq.getStatus().setProcessed(true);
        }
      }
    }
    markAsProcessed(request);
    return true;
View Full Code Here

TOP

Related Classes of org.snmp4j.agent.request.SubRequest

Copyright © 2018 www.massapicom. 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.