/**
  * storeResult
  *
  * @param collectionSet a {@link org.opennms.netmgt.collectd.SnmpCollectionSet} object.
  * @param entry a {@link org.opennms.netmgt.collectd.SNMPCollectorEntry} object.
  * @param res a {@link org.opennms.netmgt.snmp.SnmpResult} object.
  */
 public void storeResult(
     SnmpCollectionSet collectionSet, SNMPCollectorEntry entry, SnmpResult res) {
   LOG.debug("Setting attribute: {}.[{}] = '{}'", this, res.getInstance(), res.getValue());
   SnmpCollectionResource resource = null;
   if (this.getAlias().equals("ifAlias")) {
     resource = m_resourceType.findAliasedResource(res.getInstance(), res.getValue().toString());
   } else {
     resource = m_resourceType.findResource(res.getInstance());
   }
   if (resource == null) {
     collectionSet.notifyIfNotFound(this, res);
   } else {
     resource.setAttributeValue(this, res.getValue());
   }
 }
Example #2
0
 /** {@inheritDoc} */
 protected void storeResult(SnmpResult res) {
   T entry = m_results.get(res.getInstance());
   if (entry == null) {
     entry = createTableEntry(res.getBase(), res.getInstance(), res.getValue());
     m_results.put(res.getInstance(), entry);
   }
   entry.storeResult(res);
 }