Esempio n. 1
0
  /**
   * 将SnmpDevice任务添加到domainComponent
   *
   * @param SnmpDeviceNodeEntity
   */
  private void addSnmpDeviceNodeToDomain(SnmpDeviceNodeEntity entity) {
    DomainComponent domainComp = m_domainLocator.createDomainIfNessary(entity.getDomain());
    nodeidMaps.put(entity.getNodeid(), domainComp);
    SnmpDeviceNode node = createSnmpDeviceNode(entity);

    domainComp.addSnmpCollectdNode(node);
  }
Esempio n. 2
0
 public SnmpDeviceStatus getSnmpDeviceStatus(String nodeid) {
   DomainComponent domainComp = nodeidMaps.get(nodeid);
   if (domainComp != null) {
     return domainComp.getSnmpDeviceStatus(nodeid);
   }
   return null;
 }
Esempio n. 3
0
 // 根据nodeid获得域ID
 public static String getDomainId(String nodeid) {
   DomainComponent domainComp = nodeidMaps.get(nodeid);
   if (domainComp != null) {
     return domainComp.getDomainId();
   } else {
     return null;
   }
 }
Esempio n. 4
0
  private void removeSnmpDeviceNodeFromDomain(String nodeid) {
    DomainComponent domainComp = nodeidMaps.get(nodeid);
    if (domainComp != null) {

      domainComp.removeSnmpCollectdNode(nodeid);
    } else {
      if (log().isDebugEnabled()) {
        log().debug("removeSnmpDeviceNode没有找到该nodeId:" + nodeid + "对应的域 ");
      }
    }
  }
Esempio n. 5
0
 /** 用nodeid做索引存储SnmpDeviceStatus采集结果到内存域中。 */
 public void cacheSnmpDeviceResult(String nodeid, SnmpDeviceStatus status) {
   DomainComponent domainComp = nodeidMaps.get(nodeid);
   if (domainComp != null) {
     domainComp.cacheSnmpDeviceResult(nodeid, status);
   }
 }