本文整理了Java中org.opennms.netmgt.xml.event.Event.setService()
方法的一些代码示例,展示了Event.setService()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Event.setService()
方法的具体详情如下:
包路径:org.opennms.netmgt.xml.event.Event
类名称:Event
方法名:setService
[英]Sets the value of field 'service'. The field 'service' has the following description: The service to which this event is pertinent
[中]设置字段“服务”的值。“服务”字段具有以下描述:与此事件相关的服务
代码示例来源:origin: OpenNMS/opennms
/**
* <p>setService</p>
*
* @param serviceName a {@link java.lang.String} object.
* @return a {@link org.opennms.netmgt.model.events.EventBuilder} object.
*/
public EventBuilder setService(final String serviceName) {
m_event.setService(serviceName);
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
/**
* <p>setMonitoredService</p>
*
* @param monitoredService a {@link org.opennms.netmgt.model.OnmsMonitoredService} object.
* @return a {@link org.opennms.netmgt.model.events.EventBuilder} object.
*/
public EventBuilder setMonitoredService(final OnmsMonitoredService monitoredService) {
if (monitoredService != null) {
m_event.setNodeid(monitoredService.getNodeId().longValue());
m_event.setInterfaceAddress(monitoredService.getIpAddress());
m_event.setService(monitoredService.getServiceName());
}
return this;
}
代码示例来源:origin: OpenNMS/opennms
event.setService(alarm.getServiceType().getName());
内容来源于网络,如有侵权,请联系作者删除!