public EventBean copy(EventBean theEvent) { MappedEventBean mapped = (MappedEventBean) theEvent; Map<String, Object> props = mapped.getProperties(); return eventBeanTypedEventFactory.adapterForTypedMap(new HashMap<String, Object>(props), mapEventType); }
public EventBean make(Object[] properties) { Map<String, Object> values = makeUnderlying(properties); return eventAdapterService.adapterForTypedMap(values, mapEventType); }
public void matchFound(Map<String, Object> matchEvent, EventBean optionalTriggeringEvent) { EventBean compositeEvent = eventBeanTypedEventFactory.adapterForTypedMap(matchEvent, eventType); sourceEventStream.insert(compositeEvent); } };
public EventBean copy(EventBean theEvent) { MappedEventBean mapped = (MappedEventBean) theEvent; Map<String, Object> props = mapped.getProperties(); return eventAdapterService.adapterForTypedMap(new HashMap<>(props), mapEventType); } }
public List<EventBean> convert(Object invocationResult, MethodTargetStrategy origin, AgentInstanceContext agentInstanceContext) { return Collections.singletonList(agentInstanceContext.getEventBeanTypedEventFactory().adapterForTypedMap((Map) invocationResult, eventType)); } }
public void routeEvent(Object theEvent) { if (!(theEvent instanceof Map)) { throw new EPException("Unexpected event object of type " + theEvent.getClass().getName() + ", expected " + Map.class.getName()); } Map<String, Object> map = (Map<String, Object>) theEvent; EventBean mapEvent = eventBeanTypedEventFactory.adapterForTypedMap(map, mapEventType); runtimeEventSender.routeEventBean(mapEvent); } }
private EventBean populateMap(Long trendcount) { Map<String, Object> result = new HashMap<String, Object>(); result.put(PROPERTY_NAME, trendcount); return agentInstanceContext.getEventBeanTypedEventFactory().adapterForTypedMap(result, factory.getEventType()); } }
public Object handleNestedValueFragment(Object value) { if (!(value instanceof Map)) { if (value instanceof EventBean) { return mapGetter.getFragment((EventBean) value); } return null; } // If the map does not contain the key, this is allowed and represented as null EventBean eventBean = eventBeanTypedEventFactory.adapterForTypedMap((Map<String, Object>) value, fragmentType); return mapGetter.getFragment(eventBean); }
public Object handleNestedValueFragment(Object value) { if (!(value instanceof Map)) { if (value instanceof EventBean) { return mapGetter.getFragment((EventBean) value); } return null; } // If the map does not contain the key, this is allowed and represented as null EventBean eventBean = eventBeanTypedEventFactory.adapterForTypedMap((Map<String, Object>) value, fragmentType); return mapGetter.getFragment(eventBean); }
public void sendEvent(Object theEvent) { if (!(theEvent instanceof Map)) { throw new EPException("Unexpected event object of type " + theEvent.getClass().getName() + ", expected " + Map.class.getName()); } Map<String, Object> map = (Map<String, Object>) theEvent; EventBean mapEvent = eventBeanTypedEventFactory.adapterForTypedMap(map, mapEventType); if (threadingService.isInboundThreading()) { threadingService.submitInbound(mapEvent, runtimeEventSender); } else { runtimeEventSender.processWrappedEvent(mapEvent); } }
public final Iterator<EventBean> iterator() { HashMap<String, Object> current = new HashMap<String, Object>(); current.put(ViewFieldEnum.SIZE_VIEW__SIZE.getName(), size); addProperties(current); return new SingleEventIterator(agentInstanceContext.getEventBeanTypedEventFactory().adapterForTypedMap(current, eventType)); }
public final Iterator<EventBean> iterator() { Map<String, Object> newDataMap = new HashMap<String, Object>(); newDataMap.put(ViewFieldEnum.WEIGHTED_AVERAGE__AVERAGE.getName(), currentValue); addProperties(newDataMap); return new SingleEventIterator(agentInstanceContext.getEventBeanTypedEventFactory().adapterForTypedMap(newDataMap, viewFactory.eventType)); }
public Object get(EventBean theEvent, int index) throws PropertyAccessException { if (!(theEvent instanceof DecoratingEventBean)) { throw new PropertyAccessException("Mismatched property getter to EventBean type"); } DecoratingEventBean wrapperEvent = (DecoratingEventBean) theEvent; Map map = wrapperEvent.getDecoratingProperties(); EventBean wrapped = eventBeanTypedEventFactory.adapterForTypedMap(map, underlyingMapType); return decoIndexed.get(wrapped, index); }
public static Object handleBNNestedValueArrayWithMapFragment(Object value, int index, MapEventPropertyGetter getter, EventBeanTypedEventFactory eventBeanTypedEventFactory, EventType fragmentType) { Object valueMap = getBNArrayValueAtIndex(value, index); if (!(valueMap instanceof Map)) { if (value instanceof EventBean) { return getter.getFragment((EventBean) value); } return null; } // If the map does not contain the key, this is allowed and represented as null EventBean eventBean = eventBeanTypedEventFactory.adapterForTypedMap((Map<String, Object>) valueMap, fragmentType); return getter.getFragment(eventBean); }
public Object get(EventBean theEvent) { if (!(theEvent instanceof DecoratingEventBean)) { throw new PropertyAccessException("Mismatched property getter to EventBean type"); } DecoratingEventBean wrapperEvent = (DecoratingEventBean) theEvent; Map map = wrapperEvent.getDecoratingProperties(); return mapGetter.get(eventBeanTypedEventFactory.adapterForTypedMap(map, underlyingMapType)); }
public Object getFragment(EventBean theEvent) { if (!(theEvent instanceof DecoratingEventBean)) { throw new PropertyAccessException("Mismatched property getter to EventBean type"); } DecoratingEventBean wrapperEvent = (DecoratingEventBean) theEvent; Map map = wrapperEvent.getDecoratingProperties(); return mapGetter.getFragment(eventBeanTypedEventFactory.adapterForTypedMap(map, underlyingMapType)); }
public Object get(EventBean theEvent, String mapKey) throws PropertyAccessException { if (!(theEvent instanceof DecoratingEventBean)) { throw new PropertyAccessException("Mismatched property getter to EventBean type"); } DecoratingEventBean wrapperEvent = (DecoratingEventBean) theEvent; Map map = wrapperEvent.getDecoratingProperties(); EventBean wrapped = eventBeanTypedEventFactory.adapterForTypedMap(map, underlyingMapType); return decoMapped.get(wrapped, mapKey); }
public static MappedEventBean buildContextProperties(int agentInstanceId, Object[] allPartitionKeys, ContextDefinition contextDefinition, StatementContext statementContextCreate) { Map<String, Object> props = buildContextPropertiesMap(agentInstanceId, allPartitionKeys, contextDefinition); return statementContextCreate.getEventBeanTypedEventFactory().adapterForTypedMap(props, contextDefinition.getEventTypeContextProperties()); }
public Iterator<EventBean> iterator() { Object value = reader.getValue(); Map<String, Object> values = new HashMap<String, Object>(); values.put(reader.getMetaData().getVariableName(), value); EventBean theEvent = agentInstanceContext.getEventBeanTypedEventFactory().adapterForTypedMap(values, getEventType()); return new SingleEventIterator(theEvent); } }
public Iterator<EventBean> iterator() { Map<String, Object> values = factory.getVariableReadWrite().iterate(agentInstanceContext.getVariableManagementService(), agentInstanceContext.getAgentInstanceId()); EventBean theEvent = agentInstanceContext.getEventBeanTypedEventFactory().adapterForTypedMap(values, factory.getStatementEventType()); return new SingleEventIterator(theEvent); } }