org.opennms.netmgt.xml.event.Event.setSnmp()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(1.2k)|赞(0)|评价(0)|浏览(125)

本文整理了Java中org.opennms.netmgt.xml.event.Event.setSnmp()方法的一些代码示例,展示了Event.setSnmp()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Event.setSnmp()方法的具体详情如下:
包路径:org.opennms.netmgt.xml.event.Event
类名称:Event
方法名:setSnmp

Event.setSnmp介绍

[英]Sets the value of field 'snmp'. The field 'snmp' has the following description: The snmp information from the trap
[中]

代码示例

代码示例来源:origin: OpenNMS/opennms

private void ensureSnmp() {
  if (m_event.getSnmp() == null) {
    m_event.setSnmp(new Snmp());
  }
  
}

代码示例来源:origin: OpenNMS/opennms

private Event cloneEvent(Event srcEvent) {
  Event clonedEvent = EventTranslatorConfigFactory.cloneEvent(srcEvent);
  /* since alarmData and severity are computed based on translated information in 
   * eventd using the data from eventconf, we unset it here to eventd
   * can reset to the proper new settings.
   */ 
  clonedEvent.setAlarmData(null);
  clonedEvent.setSeverity(null);
  /* the reasoning for alarmData and severity also applies to description (see NMS-4038). */
  clonedEvent.setDescr(null);
  if (!m_mapping.getPreserveSnmpData()) { // NMS-8374
    clonedEvent.setSnmp(null);
  }
  return clonedEvent;
}

代码示例来源:origin: OpenNMS/opennms

e.setSnmp(transform(econf.getSnmp()));

代码示例来源:origin: org.opennms.features.events/org.opennms.features.events.daemon

e.setSnmp(transform(econf.getSnmp()));

相关文章