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

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

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

Event.setHost介绍

[英]Sets the value of field 'host'. The field 'host' has the following description: The host at which the event is generated
[中]设置字段“主机”的值。字段“主机”具有以下描述:生成事件的主机

代码示例

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

/**
 * <p>setHost</p>
 *
 * @param hostname a {@link java.lang.String} object.
 * @return a {@link org.opennms.netmgt.model.events.EventBuilder} object.
 */
public EventBuilder setHost(final String hostname) {
  m_event.setHost(hostname);
  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

private Event createEventWithParms(String uei, List<Parm> parms) {
  Event e = MockEventUtil.createEventBuilder("Automation", uei).getEvent();
  e.setHost("localhost");
  
  e.setParmCollection(parms);
  Logmsg logmsg = new Logmsg();
  logmsg.setContent("Testing Passive Status Keeper with down status");
  e.setLogmsg(logmsg);
  return e;
}

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

private Event createEventWithParms(String uei, List<Parm> parms) {
  Event e = MockEventUtil.createEventBuilder("Test", uei).getEvent();
  e.setHost("localhost");
  
  e.setParmCollection(parms);
  Logmsg logmsg = new Logmsg();
  logmsg.setContent("Testing Passive Status Keeper with down status");
  e.setLogmsg(logmsg);
  return e;
}

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

if (onmsEvent.getSeverityLabel() !=null ) event.setSeverity(onmsEvent.getSeverityLabel());
if (onmsEvent.getEventDescr() !=null ) event.setDescr(onmsEvent.getEventDescr());
if (onmsEvent.getEventHost() !=null ) event.setHost(onmsEvent.getEventHost());

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

if (onmsEvent.getSeverityLabel() !=null ) event.setSeverity(onmsEvent.getSeverityLabel());
if (onmsEvent.getEventDescr() !=null ) event.setDescr(onmsEvent.getEventDescr());
if (onmsEvent.getEventHost() !=null ) event.setHost(onmsEvent.getEventHost());

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

if (onmsEvent.getEventHost()!=null ) event.setHost(onmsEvent.getEventHost());

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

event.setHost(alarm.getLastEvent().getEventHost());

相关文章