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

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

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

Event.setUei介绍

[英]Sets the value of field 'uei'. The field 'uei' has the following description: The Universal Event Identifier
[中]设置字段“uei”的值。字段“uei”具有以下描述:通用事件标识符

代码示例

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

public EventBuilder setUei(final String uei) {
  m_event.setUei(uei);
  checkForIllegalUei();
  return this;
}

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

@Override
public void processRow(ResultSet rs) throws SQLException {
  event.setDbid(rs.getInt("eventid"));
  event.setUei(rs.getString("eventuei"));
  event.setNodeid(rs.getLong("nodeid"));
  event.setTime(rs.getDate("eventtime"));
  event.setHost(rs.getString("eventhost"));
  event.setInterface(rs.getString("ipaddr"));
  event.setSnmphost(rs.getString("eventsnmphost"));
  event.setService(getServiceName(rs.getInt("serviceid")));
  event.setCreationTime(rs.getDate("eventcreatetime"));
  event.setSeverity(rs.getString("eventseverity"));
  event.setPathoutage(rs.getString("eventpathoutage"));
  Tticket tticket = new Tticket();
  tticket.setContent(rs.getString("eventtticket"));
  tticket.setState(rs.getString("eventtticketstate"));
  event.setTticket(tticket);
  event.setSource(rs.getString("eventsource"));
}

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

eventToMatch.setUei(entry.getKey());
if (matcher.matches(eventToMatch)) {

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

final org.opennms.netmgt.xml.eventconf.Event econf = eventConfDao.findByEvent(event);
if (econf == null || econf.getUei() == null) {
  event.setUei("uei.opennms.org/default/trap");
} else {
  event.setUei(econf.getUei());

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

final org.opennms.netmgt.xml.eventconf.Event econf = eventConfDao.findByEvent(event);
if (econf == null || econf.getUei() == null) {
  event.setUei("uei.opennms.org/default/trap");
} else {
  event.setUei(econf.getUei());

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

/**
 * This is a test for the method that verifies valid passive status events
 * for the passive status keeper.
 *
 */
@Test
public void testIsPassiveStatusEvent() {
  
  Event e = createPassiveStatusEvent("Router", "192.168.1.1", "ICMP", "Down");
  assertTrue(m_psk.isPassiveStatusEvent(e));
  
  //test for missing required parms
  e = createPassiveStatusEvent("Router", "192.168.1.1", null, "Down");
  assertFalse(m_psk.isPassiveStatusEvent(e));
  
  //this will test the event simply doesn't match a registered uei.
  e.setUei("bogusUei");
  assertFalse(m_psk.isPassiveStatusEvent(e));
      
}

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

private static Event toEvent(OnmsEvent onmsEvent) {
  final Event event = new Event();
  if (onmsEvent.getId() != null) event.setDbid(onmsEvent.getId());
  if (onmsEvent.getEventUei() != null ) event.setUei(onmsEvent.getEventUei());
  if (onmsEvent.getEventCreateTime() != null ) event.setCreationTime(onmsEvent.getEventCreateTime());
  if (onmsEvent.getSeverityLabel() !=null ) event.setSeverity(onmsEvent.getSeverityLabel());

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

if (onmsEvent.getEventUei() !=null ) event.setUei(onmsEvent.getEventUei());
if (onmsEvent.getEventCreateTime() !=null ) event.setCreationTime(onmsEvent.getEventCreateTime());

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

private static Event toEvent(OnmsEvent onmsEvent) {
  final Event event = new Event();
  if (onmsEvent.getId() != null) event.setDbid(onmsEvent.getId());
  if (onmsEvent.getEventUei() != null ) event.setUei(onmsEvent.getEventUei());
  if (onmsEvent.getEventCreateTime() != null ) event.setCreationTime(onmsEvent.getEventCreateTime());
  if (onmsEvent.getSeverityLabel() !=null ) event.setSeverity(onmsEvent.getSeverityLabel());

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

e.setUei(econf.getUei());

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

e.setUei(econf.getUei());

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

event.setUei(alarm.getUei());
} else {
  return null;

相关文章