public void addAllEvents(Events events) { if (events == null) { return; } final List<Event> eventCollection = events.getEventCollection(); if (eventCollection != null) { for (final Event e : eventCollection) { this.addEvent(e); } } } }
public void addAllEvents(Events events) { if (events == null) { return; } final List<Event> eventCollection = events.getEventCollection(); if (eventCollection != null) { for (final Event e : eventCollection) { this.addEvent(e); } } } }
/** * Send the incoming {@link Log} message into the Camel route * specified by the {@link #m_endpointUri} property. */ @Override public void sendNow(Log eventLog) { for (Event event : eventLog.getEvents().getEventCollection()) { m_proxy.sendNow(event); } }
/** * <p>send</p> * * @param eventLog a {@link org.opennms.netmgt.xml.event.Log} object. * @throws org.opennms.netmgt.events.api.EventProxyException if any. */ @Override public void send(Log eventLog) throws EventProxyException { for (Event e : eventLog.getEvents().getEventCollection()) { add(e); } }
/** * Send the incoming {@link Log} message into the Camel route * specified by the {@link #m_endpointUri} property. */ @Override public void sendNow(Log eventLog) { for (Event event : eventLog.getEvents().getEventCollection()) { m_proxy.sendNow(event); } } }
@Override public void sendNow(final Log eventLog) { for (final Event event : eventLog.getEvents().getEventCollection()) { sendNow(event); } }
@Override public void sendNow(final Log eventLog) { for (final Event event : eventLog.getEvents().getEventCollection()) { sendNow(event); } }
@Override public void sendNowSync(Log eventLog) { for (final Event event : eventLog.getEvents().getEventCollection()) { sendNow(event, true); } }
@Override public void sendNowSync(Log eventLog) { for (final Event event : eventLog.getEvents().getEventCollection()) { sendNow(event, true); } }
/** * Send the incoming {@link Log} message into the Camel route * specified by the {@link #m_endpointUri} property. */ @Override public void sendNow(Log eventLog) { for (Event event : eventLog.getEvents().getEventCollection()) { m_proxy.sendNow(event); } }
@Override public void process(Log eventLog) throws EventProcessorException { if (eventLog != null && eventLog.getEvents() != null) { final List<Event> eventsInLog = eventLog.getEvents().getEventCollection();
@Override public void sendNow(final Log log) { if (log != null && log.getEvents() != null && log.getEvents().getEventCount() > 0) { m_events.addAll(log.getEvents().getEventCollection()); } }
@Override public void process(Log eventLog) throws EventProcessorException { if (eventLog != null && eventLog.getEvents() != null) { final List<Event> eventsInLog = eventLog.getEvents().getEventCollection();
@Override public void sendNow(final Log log) { if (log != null && log.getEvents() != null && log.getEvents().getEventCount() > 0) { m_events.addAll(log.getEvents().getEventCollection()); } }
@Override public void handleMessage(TrapLogDTO messageLog) { try (Logging.MDCCloseable mdc = Logging.withPrefixCloseable(Trapd.LOG4J_CATEGORY)) { final Log eventLog = toLog(messageLog); eventForwarder.sendNowSync(eventLog); // If configured, also send events for new suspects if (config.getNewSuspectOnTrap()) { eventLog.getEvents().getEventCollection().stream() .filter(e -> !e.hasNodeid()) .forEach(e -> { sendNewSuspectEvent(e.getInterface(), e.getDistPoller()); LOG.debug("Sent newSuspectEvent for interface {}", e.getInterface()); }); } } }
private void broadcast(Log eventLog) { if (LOG.isTraceEnabled()) { for (Event event : eventLog.getEvents().getEventCollection()) { LOG.trace("Processing a syslog to event dispatch", event.toString()); String uuid = event.getUuid(); eventLog.getEvents().getEventCollection().stream() .filter(e -> !e.hasNodeid()) .forEach(e -> {
@Override public void handleMessage(TrapLogDTO messageLog) { try (Logging.MDCCloseable mdc = Logging.withPrefixCloseable(Trapd.LOG4J_CATEGORY)) { final Log eventLog = toLog(messageLog); eventForwarder.sendNowSync(eventLog); // If configured, also send events for new suspects if (config.getNewSuspectOnTrap()) { eventLog.getEvents().getEventCollection().stream() .filter(e -> !e.hasNodeid()) .forEach(e -> { sendNewSuspectEvent(e.getInterface(), e.getDistPoller()); LOG.debug("Sent newSuspectEvent for interface {}", e.getInterface()); }); } } }
@Override public void run() { final RateLimiter rateLimiter = RateLimiter.create(eventsPerSecondPerThread); while (true) { Log log = new Log(); log.setEvents(new Events()); for (int i=0; i<batchSize; i++) { log.getEvents().getEventCollection().add(getNextEvent()); } rateLimiter.acquire(batchSize); if (isSynchronous) { eventForwarder.sendNowSync(log); } else { eventForwarder.sendNow(log); } eventsGenerated.mark(batchSize); if (Thread.interrupted()) { break; } } }
for (final Event event : events.getEventCollection()) { if (event.getNodeid() == 0) { final Parm foreignSource = event.getParm("_foreignSource");
for (final Event event : events.getEventCollection()) { if (event.getNodeid() == 0) { final Parm foreignSource = event.getParm("_foreignSource");