/** * setMonitoredService * * @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; }
private void completeEventListAndAddToEvents( Events events, List<Event> eventList, LatencyInterface latIface) throws ThresholdingException { for (Event event : eventList) { event.setNodeid((long) latIface.getNodeId()); event.setInterfaceAddress(latIface.getInetAddress()); event.setService(latIface.getServiceName()); events.addEvent(event); } }
/** * setService * * @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; }