Package org.snmp4j.agent.request

Examples of org.snmp4j.agent.request.RequestStatus


        new DefaultMOContextScope(context, oid, true, oid, true);
    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;
        }

        public void setErrorStatus(int errorStatus) {
          status.setErrorStatus(errorStatus);
        }

        public int getErrorStatus() {
          return status.getErrorStatus();
        }

        public RequestStatus getStatus() {
          return status;
        }
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;
        }
      }
    }
    return true;
View Full Code Here

    private volatile Object userObject;

    private AgentXSubRequest(int index) {
      this.index = index;
      status = new RequestStatus();
      status.addRequestStatusListener(this);
    }
View Full Code Here

TOP

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

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.