@SuppressWarnings({ "rawtypes", "unchecked" }) @Override public void update(EventBean[] newEvents, EventBean[] oldEvents) { if (newEvents != null && newEvents.length > 0) { Map<String, Object> eventMap = getEventMap(newEvents[0]); if (eventMap != null) { for (Map.Entry<String, Object> e : eventMap.entrySet()) { if (e.getValue() != null) { if (e.getValue() instanceof Map) { event.putAll((Map)e.getValue()); } else { event.put(e.getKey(), e.getValue()); } } } } } } }
private void sessionBegin(Session session) { JetstreamEvent sessionBeginEvent = new JetstreamEvent(); sessionBeginEvent.setEventType(mainSessionProfile.getBeginMarker()); Map<String, Object> initialAttributes = session.getInitialAttributes(); if (initialAttributes != null) { sessionBeginEvent.putAll(initialAttributes); } if (mainSessionProfile.getSessionIdKey() != null) { sessionBeginEvent.put(mainSessionProfile.getSessionIdKey(), session.getSessionId()); } if (mainSessionProfile.getSessionStartTimestampKey() != null) { sessionBeginEvent.put(mainSessionProfile.getSessionStartTimestampKey(), session.getCreationTime()); } if (mainEsperSessionizer != null && mainEsperSessionizer.isEventSupported(sessionBeginEvent)) { mainEsperSessionizer.process(session, sessionBeginEvent); } eventSender.sendSessionBeginEvent(mainSessionProfile.getSessionType(), session, sessionBeginEvent); }
sessionEndEvent.putAll(subSession.getInitialAttributes());
Map<String, Object> initialAttributes = subSession.getInitialAttributes(); if (initialAttributes != null) { sessionBeginEvent.putAll(initialAttributes);
Map<String, Object> initialAttributes = session.getInitialAttributes(); if (initialAttributes != null) { sessionEndEvent.putAll(initialAttributes);