/** * 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; }
/** * setIpInterface * * @param iface a {@link org.opennms.netmgt.model.OnmsIpInterface} object. * @return a {@link org.opennms.netmgt.model.events.EventBuilder} object. */ public EventBuilder setIpInterface(final OnmsIpInterface iface) { if (iface != null) { if (iface.getNode() != null) { m_event.setNodeid(iface.getNode().getId().longValue()); } m_event.setInterfaceAddress(iface.getIpAddress()); } 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); } }
/** * setInterface * * @param ipAddress a {@link java.lang.String} object. * @return a {@link org.opennms.netmgt.model.events.EventBuilder} object. */ public EventBuilder setInterface(final InetAddress ipAddress) { m_event.setInterfaceAddress(ipAddress); return this; }