Examples of MOTableRow


Examples of org.snmp4j.agent.mo.MOTableRow

        new OctetString(), // default context name
        new OctetString(), // transport tag
        new Integer32(StorageType.nonVolatile), // storage type
        new Integer32(RowStatus.active) // row status
    };
    MOTableRow row = communityMIB.getSnmpCommunityEntry().createRow(
        new OctetString("public2public").toSubIndex(true), com2sec);
    communityMIB.getSnmpCommunityEntry().addRow(row);
  }
View Full Code Here

Examples of org.snmp4j.agent.mo.MOTableRow

        new OctetString(),              // default context name
        new OctetString(),                      // transport tag
        new Integer32(StorageType.nonVolatile), // storage type
        new Integer32(RowStatus.active)         // row status
    };
    MOTableRow row =
        communityMIB.getSnmpCommunityEntry().createRow(
          new OctetString("public2public").toSubIndex(true), com2sec);
    communityMIB.getSnmpCommunityEntry().addRow(row);
  }
View Full Code Here

Examples of org.snmp4j.agent.mo.MOTableRow

      Object failed = it.next();
      if (failed instanceof ManagedObject) {
        server.unregister((ManagedObject)failed, null);
      }
      else if (failed instanceof MOTableRow) {
        MOTableRow r = (MOTableRow)failed;
      }
    }
  }
View Full Code Here

Examples of org.snmp4j.agent.mo.MOTableRow

      for (Iterator it = mo.getModel().iterator(); it.hasNext();) {
        rows.add(it.next());
      }
      for (Iterator it = rows.iterator(); it.hasNext();) {
        boolean retry = true;
        MOTableRow row = (MOTableRow) it.next();
        int retries = 0;
        int status;
        OID newIndex;
        do {
          newIndex = (OID) row.getIndex().clone();
          status = sharedTableSupport.allocateIndex(context, mo.getIndexDef(),
              (byte) AgentXSharedMOTableSupport.INDEX_MODE_ALLOCATE,
              newIndex);
        }
        while (retry && (registrationCallback != null) &&
               registrationCallback.tableRegistrationEvent(context,
            mo, row, true, status, retries++));
        if (status == AgentXProtocol.AGENTX_SUCCESS) {
          if ((newIndex instanceof AnyNewIndexOID) ||
              (newIndex instanceof NewIndexOID)) {
            if (mo instanceof AgentXSharedMutableMOTable) {
              ((AgentXSharedMutableMOTable)mo).
                  changeRowIndex(row.getIndex(), newIndex);
            }
            retry = false;
          }
          status = sharedTableSupport.registerRow(mo, row);
          if (status != AgentXProtocol.AGENTX_SUCCESS) {
            sharedTableSupport.deallocateIndex(context, mo.getIndexDef(),
                                               row.getIndex());
            LOGGER.warn("Failed to register row with " + status + " for " +
                        row);
          }
          if (registrationCallback != null) {
            registrationCallback.tableRegistrationEvent(context,
View Full Code Here

Examples of org.snmp4j.agent.mo.MOTableRow

  }

  public boolean changeRowIndex(OID oldIndex, OID newIndex) {
    if (model instanceof MOMutableTableModel) {
      MOMutableTableModel mutableModel = (MOMutableTableModel) model;
      MOTableRow r = mutableModel.removeRow(oldIndex);
      if (r == null) {
        return false;
      }
      r.getIndex().setValue(newIndex.getValue());
      MOTableRow existingRow = mutableModel.addRow(r);
      if (existingRow != null) {
        mutableModel.removeRow(newIndex);
        r.getIndex().setValue(oldIndex.getValue());
        mutableModel.addRow(r);
        mutableModel.addRow(existingRow);
View Full Code Here

Examples of org.snmp4j.agent.mo.MOTableRow

        new OctetString(),                      // default context name
        new OctetString(),                      // transport tag
        new Integer32(StorageType.nonVolatile), // storage type
        new Integer32(RowStatus.active)         // row status
    };
    MOTableRow row =
        communityMIB.getSnmpCommunityEntry().createRow(
          new OctetString("public2public").toSubIndex(true), com2sec);
    communityMIB.getSnmpCommunityEntry().addRow(row);
  }
View Full Code Here

Examples of org.snmp4j.agent.mo.MOTableRow

                new OctetString("public"), // default context name
                new OctetString(), // transport tag
                new Integer32(StorageType.nonVolatile), // storage type
                new Integer32(RowStatus.active) // row status
        };
        MOTableRow row = communityMIB.getSnmpCommunityEntry().createRow(
                new OctetString("public2public").toSubIndex(true), com2sec);
        communityMIB.getSnmpCommunityEntry().addRow(row);
    }
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.