Package org.snmp4j.agent

Examples of org.snmp4j.agent.MOScope


    HashMap serializableMO = new HashMap();
    serializableMO.clear();
    for (int i=0; i<servers.length; i++) {
      for (Iterator it = servers[i].iterator(); it.hasNext(); ) {
        Entry entry = (Entry) it.next();
        MOScope scope = (MOScope) entry.getKey();
        ManagedObject value = (ManagedObject) entry.getValue();
        if ((value instanceof SerializableManagedObject) &&
            (!((SerializableManagedObject) value).isVolatile())) {
          OctetString context = null;
          if (scope instanceof MOContextScope) {
View Full Code Here


                                              !searchRange.isUpperIncluded(),
                                              null, false);
    AgentXNodeQuery query =
        new AgentXNodeQuery(entry.getContext(), scope,
                            AgentXNodeQuery.QUERY_ALL);
    MOScope requestScope = searchRange.getReferenceSubRequest().getScope();
    MOServer server = getServer(entry.getContext());
    for (ManagedObject node = server.lookup(query);
         (node instanceof AgentXNode);
         node = server.lookup(nextQuery(query, (AgentXNode)node)))
    {
      AgentXRegEntry activeReg = ((AgentXNode)node).getActiveRegistration();
      MOScope region = node.getScope();
      if ((activeReg != null) &&
          (activeReg.getSession().equals(entry.getSession()))) {
        if ((requestScope.getUpperBound() != null) &&
            (requestScope.getUpperBound().
             compareTo(region.getUpperBound()) <= 0)) {
          searchRange.setUpperBound(requestScope.getUpperBound());
          searchRange.setUpperIncluded(requestScope.isUpperIncluded());
          break;
        }
        searchRange.setUpperBound(region.getUpperBound());
        searchRange.setUpperIncluded(region.isUpperIncluded());
      }
      else {
        if ((searchRange.getUpperBound() == null) ||
            (searchRange.getUpperBound().compareTo(region.getLowerBound()) >= 0)) {
          searchRange.setUpperBound(region.getLowerBound());
          searchRange.setUpperIncluded(!region.isLowerIncluded());
        }
        break;
      }
    }
    if (LOGGER.isDebugEnabled()) {
View Full Code Here

TOP

Related Classes of org.snmp4j.agent.MOScope

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.