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

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

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

Event.getDescr介绍

[英]Returns the value of field 'descr'. The field 'descr' has the following description: The event description
[中]返回字段“descr”的值。字段“descr”具有以下描述:事件描述

代码示例

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

@Override
  public String getValue(String parm, String parsedParm, Event event, EventUtil eventUtil) {
    return event.getDescr();
  }
},

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

@Override
  public String getValue(String parm, String parsedParm, Event event, EventUtil eventUtil) {
    return event.getDescr();
  }
},

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

private void verifyEvents(int remainEvents) {
  if (remainEvents == 0) {
    List<Event> receivedList = new ArrayList<>(m_anticipator.getAnticipatedEventsReceived());
    
    Collections.sort(receivedList, EVENT_COMPARATOR);
    Collections.sort(m_anticipatedEvents, EVENT_COMPARATOR);
    LOG.info("verifyEvents: Anticipated={}, Received= {}", receivedList.size(), m_anticipatedEvents.size());
    if (m_anticipatedEvents.size() != receivedList.size()) {
      for (Event e : m_anticipatedEvents) {
        System.err.println("expected event " + e.getUei() + ": " + e.getDescr());
      }
      System.err.println("anticipated = " + m_anticipatedEvents + "\nreceived = " + receivedList);
      fail("Anticipated event count (" + m_anticipatedEvents.size() + ") is different from received event count (" + receivedList.size() + ").");
    }
    for (int i = 0; i < m_anticipatedEvents.size(); i++) {
      LOG.info("verifyEvents: processing event {}", (i+1));
      compareEvents(m_anticipatedEvents.get(i), receivedList.get(i));
    }
  }
  m_anticipator.verifyAnticipated(0, 0, 0, remainEvents, 0);
}

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

private void verifyEvents(int remainEvents) {
  if (remainEvents == 0) {
    List<Event> receivedList = new ArrayList<>(m_eventIpcManager.getEventAnticipator().getAnticipatedEventsReceived());
    
    Collections.sort(receivedList, EVENT_COMPARATOR);
    Collections.sort(m_anticipatedEvents, EVENT_COMPARATOR);
    LOG.info("verifyEvents: Anticipated={}, Received= {}", receivedList.size(), m_anticipatedEvents.size());
    if (m_anticipatedEvents.size() != receivedList.size()) {
      for (Event e : m_anticipatedEvents) {
        System.err.println("expected event " + e.getUei() + ": " + e.getDescr());
      }
      System.err.println("anticipated = " + m_anticipatedEvents + "\nreceived = " + receivedList);
      fail("Anticipated event count (" + m_anticipatedEvents.size() + ") is different from received event count (" + receivedList.size() + ").");
    }
    for (int i = 0; i < m_anticipatedEvents.size(); i++) {
      LOG.info("verifyEvents: processing event {}", (i+1));
      compareEvents(m_anticipatedEvents.get(i), receivedList.get(i));
    }
  }
  m_eventIpcManager.getEventAnticipator().verifyAnticipated(0, 0, 0, remainEvents, 0);
}

代码示例来源:origin: org.opennms.plugins/opennms-es-rest.main-module

body.put("eventdescr", event.getDescr());

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

body.put("eventdescr", event.getDescr());

代码示例来源:origin: org.opennms.features/org.opennms.features.opennms-es-rest

body.put("eventdescr", event.getDescr());

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

if (event.getDescr() != null) {
  b.append(" Descr: " + event.getDescr() + "\n");

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

if (event.getDescr() != null) {
  strRet = m_eventUtil.expandParms(event.getDescr(), event,decode);
  if (strRet != null) {
    event.setDescr(strRet);

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

if (event.getDescr() != null) {
  strRet = m_eventUtil.expandParms(event.getDescr(), event,decode);
  if (strRet != null) {
    event.setDescr(strRet);

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

else
    snmpTrapHelper.addVarBinding(trap, ".1.3.6.1.4.1.5813.20.1.13.0", "OctetString", "text", "null");    
if (event.getDescr() != null) {
  String descrString = event.getDescr().replaceAll("&lt;.*&gt;", " ").replaceAll("\\s+", " ");
  snmpTrapHelper.addVarBinding(trap, ".1.3.6.1.4.1.5813.20.1.16.0", "OctetString", "text", descrString);
} else

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

.setSeverity(toSeverity(OnmsSeverity.get(event.getSeverity())))
    .setLabel(eventConfDao.getEventLabel(event.getUei()));
if (event.getDescr() != null) {
  builder.setDescription(event.getDescr());

代码示例来源:origin: org.opennms.features.kafka/org.opennms.features.kafka.producer

.setSeverity(toSeverity(OnmsSeverity.get(event.getSeverity())))
    .setLabel(eventConfDao.getEventLabel(event.getUei()));
if (event.getDescr() != null) {
  builder.setDescription(event.getDescr());

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

private void validateTranslatedEvent(Event event) {
  assertEquals(m_translator.getName(), event.getSource());
  assertEquals(Long.valueOf(3), event.getNodeid());
  assertEquals("www.opennms.org", event.getHost());
  assertEquals("a generated event", event.getDescr());
  assertEquals("192.168.1.1", event.getInterface());
  assertEquals("Switch", EventUtils.getParm(event, "nodeLabel"));
  assertEquals("PSV", event.getService());
  assertEquals("Down", EventUtils.getParm(event, "passiveStatus"));
}

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

ovent.setEventDescr(EventDatabaseConstants.format(event.getDescr(), 0));

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

ovent.setEventDescr(EventDatabaseConstants.format(event.getDescr(), 0));

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

oe.setEventCreateTime(event.getCreationTime());
oe.setId(event.getDbid());
oe.setEventDescr(event.getDescr());
try {
  oe.setDistPoller(m_distPollerDao.get(event.getDistPoller()));

代码示例来源:origin: org.opennms/opennms-dao-mock

oe.setEventCreateTime(event.getCreationTime());
oe.setId(event.getDbid());
oe.setEventDescr(event.getDescr());
try {
  oe.setDistPoller(m_distPollerDao.get(event.getDistPoller()));

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

e.setDescr(null);
if (e.getDescr() == null && econf.getDescr() != null) {
  e.setDescr(econf.getDescr());

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

e.setDescr(null);
if (e.getDescr() == null && econf.getDescr() != null) {
  e.setDescr(econf.getDescr());

相关文章