public EventType getEventTypePreconfigured(String eventTypeName) { return services.getEventTypeRepositoryBus().getTypeByName(eventTypeName); }
static void deleteFromEventTypeBus(EPServicesContext services, Map<Long, EventType> eventTypes) { for (Map.Entry<Long, EventType> entry : eventTypes.entrySet()) { if (entry.getValue().getMetadata().getBusModifier() == EventTypeBusModifier.BUS) { services.getEventTypeRepositoryBus().removeType(entry.getValue()); } } }
EventType eventType = runtime.getServicesContext().getEventTypeRepositoryBus().getNameToTypeMap().get(name); if (eventType == null) { log.warn(".unmarshal Failed to unmarshal map message, event type name '" + name + "' is not a known type"); EventType eventType = runtime.getServicesContext().getEventTypeRepositoryBus().getNameToTypeMap().get(name); if (eventType == null) { log.warn(".unmarshal Failed to unmarshal map message, event type name '" + name + "' is not a known type");
private EsperHttpRequestCacheEntry makeCacheEntry(String eventTypeName) { EventType eventType = runtime.getServicesContext().getEventTypeRepositoryBus().getNameToTypeMap().get(eventTypeName); if (eventType == null) { log.info("Event type by name '" + eventTypeName + "' not found.");
private WriterCacheEntry makeCacheEntry(String eventTypeName) { EventType eventType = runtime.getServicesContext().getEventTypeRepositoryBus().getNameToTypeMap().get(eventTypeName); if (eventType == null) { log.info("Event type by name '" + eventTypeName + "' not found.");
EventType eventType = runtime.getServicesContext().getEventTypeRepositoryBus().getNameToTypeMap().get(request.getStream()); if (eventType == null) { throw new ConfigurationException("Event type by name '" + request.getStream() + "' not found");
public EPCompilerPathable getRuntimePath() { EPServicesContext services = runtimeEnvironment.getServices(); VariableRepositoryPreconfigured variables = new VariableRepositoryPreconfigured(); for (Map.Entry<String, VariableDeployment> entry : services.getVariableManagementService().getDeploymentsWithVariables().entrySet()) { for (Map.Entry<String, Variable> variableEntry : entry.getValue().getVariables().entrySet()) { if (variableEntry.getValue().getMetaData().isPreconfigured()) { variables.addVariable(variableEntry.getKey(), variableEntry.getValue().getMetaData()); } } } EventTypeRepositoryImpl eventTypes = new EventTypeRepositoryImpl(true); for (Map.Entry<String, EventType> entry : services.getEventTypeRepositoryBus().getNameToTypeMap().entrySet()) { if (entry.getValue().getMetadata().getAccessModifier() == NameAccessModifier.PRECONFIGURED) { eventTypes.addType(entry.getValue()); } } return new EPCompilerPathableImpl( services.getVariablePathRegistry().copy(), services.getEventTypePathRegistry().copy(), services.getExprDeclaredPathRegistry().copy(), services.getNamedWindowPathRegistry().copy(), services.getTablePathRegistry().copy(), services.getContextPathRegistry().copy(), services.getScriptPathRegistry().copy(), eventTypes, variables); }
EventType eventType = runtime.getServicesContext().getEventTypeRepositoryBus().getNameToTypeMap().get(dmlQuery.getStream()); if (eventType == null) { throw new ConfigurationException("Event type by name '" + dmlQuery.getStream() + "' not found");
EventTypeResolverImpl eventTypeResolver = new EventTypeResolverImpl(moduleEventTypes, services.getEventTypePathRegistry(), services.getEventTypeRepositoryBus(), services.getBeanEventTypeFactoryPrivate()); EventTypeCollectorImpl eventTypeCollector = new EventTypeCollectorImpl(moduleEventTypes, beanEventTypeFactory, services.getEventTypeFactory(), services.getBeanEventTypeStemService(), eventTypeResolver, services.getXmlFragmentEventTypeFactory(), services.getEventTypeAvroHandler(), services.getEventBeanTypedEventFactory()); try { if (eventTypeMetadata.getBusModifier() == EventTypeBusModifier.BUS) { eventTypeSPI.setMetadataId(nameTypeId, -1); services.getEventTypeRepositoryBus().addType(eventTypeSPI); } else { eventTypeSPI.setMetadataId(deploymentIdCrc32, nameTypeId);
EventType eventType = runtime.getServicesContext().getEventTypeRepositoryBus().getNameToTypeMap().get(upsert.getStream()); if (eventType == null) { throw new ConfigurationException("Event type by name '" + upsert.getStream() + "' not found");
EventTypeResolverImpl eventTypeResolver = new EventTypeResolverImpl(moduleTypes, services.getEventTypePathRegistry(), services.getEventTypeRepositoryBus(), services.getBeanEventTypeFactoryPrivate()); EventTypeCollectorImpl eventTypeCollector = new EventTypeCollectorImpl(moduleTypes, services.getBeanEventTypeFactoryPrivate(), services.getEventTypeFactory(), services.getBeanEventTypeStemService(), eventTypeResolver, services.getXmlFragmentEventTypeFactory(), services.getEventTypeAvroHandler(), services.getEventBeanTypedEventFactory()); fafProvider.initializeEventTypes(new EPModuleEventTypeInitServicesImpl(eventTypeCollector, eventTypeResolver));
public EventSender getEventSender(String eventTypeName) throws EventTypeException { EventType eventType = services.getEventTypeRepositoryBus().getTypeByName(eventTypeName); if (eventType == null) { throw new EventTypeException("Event type named '" + eventTypeName + "' could not be found"); } // handle built-in types ThreadingService threadingService = services.getThreadingService(); if (eventType instanceof BeanEventType) { return new EventSenderBean(this, (BeanEventType) eventType, services.getEventBeanTypedEventFactory(), threadingService); } if (eventType instanceof MapEventType) { return new EventSenderMap(this, (MapEventType) eventType, services.getEventBeanTypedEventFactory(), threadingService); } if (eventType instanceof ObjectArrayEventType) { return new EventSenderObjectArray(this, (ObjectArrayEventType) eventType, services.getEventBeanTypedEventFactory(), threadingService); } if (eventType instanceof BaseXMLEventType) { return new EventSenderXMLDOM(this, (BaseXMLEventType) eventType, services.getEventBeanTypedEventFactory(), threadingService); } if (eventType instanceof AvroSchemaEventType) { return new EventSenderAvro(this, eventType, services.getEventBeanTypedEventFactory(), threadingService); } throw new EventTypeException("An event sender for event type named '" + eventTypeName + "' could not be created as the type is not known"); }
Set<EventType> filterServiceTypes = new LinkedHashSet<>(services.getEventTypeRepositoryBus().getAllTypes()); filterServiceTypes.addAll(protectedVisibleTypes); Supplier<Collection<EventType>> availableTypes = new Supplier<Collection<EventType>>() {
if (services.getEventTypeRepositoryBus().getTypeByName(publicEventType) == null) { throw makePreconditionExceptionPreconfigured(PathRegistryObjectType.EVENTTYPE, publicEventType);
private void finishInitialization(EPRuntime runtime, CSVInputAdapterSpec spec) { assertValidParameters(runtime, spec); EPRuntimeSPI spi = (EPRuntimeSPI) runtime; scheduleSlot = new ScheduleBucket(-1).allocateSlot(); reader = new CSVReader(spec.getAdapterInputSource()); reader.setLooping(spec.isLooping()); String[] firstRow = getFirstRow(); Map<String, Object> givenPropertyTypes = constructPropertyTypes(spec.getEventTypeName(), spec.getPropertyTypes(), spi.getServicesContext().getEventTypeRepositoryBus()); propertyOrder = spec.getPropertyOrder() != null ? spec.getPropertyOrder() : CSVPropertyOrderHelper.resolvePropertyOrder(firstRow, givenPropertyTypes); reader.setIsUsingTitleRow(isUsingTitleRow(firstRow, propertyOrder)); if (!isUsingTitleRow(firstRow, propertyOrder)) { this.firstRow = firstRow; } propertyTypes = resolvePropertyTypes(givenPropertyTypes, spi.getServicesContext().getClasspathImportServiceRuntime()); if (givenPropertyTypes == null) { throw new EPException("CSV adapter requires a predefined event type name, the event type named '" + spec.getEventTypeName() + "' could not be found"); } coercer.setPropertyTypes(propertyTypes); }
private void finishInitialization(EPRuntime runtime, CSVInputAdapterSpec spec) { assertValidParameters(runtime, spec); EPRuntimeSPI spi = (EPRuntimeSPI) runtime; scheduleSlot = new ScheduleBucket(-1).allocateSlot(); reader = new CSVReader(spec.getAdapterInputSource()); reader.setLooping(spec.isLooping()); String[] firstRow = getFirstRow(); Map<String, Object> givenPropertyTypes = constructPropertyTypes(spec.getEventTypeName(), spec.getPropertyTypes(), spi.getServicesContext().getEventTypeRepositoryBus()); propertyOrder = spec.getPropertyOrder() != null ? spec.getPropertyOrder() : CSVPropertyOrderHelper.resolvePropertyOrder(firstRow, givenPropertyTypes); reader.setIsUsingTitleRow(isUsingTitleRow(firstRow, propertyOrder)); if (!isUsingTitleRow(firstRow, propertyOrder)) { this.firstRow = firstRow; } propertyTypes = resolvePropertyTypes(givenPropertyTypes, spi.getServicesContext().getClasspathImportServiceRuntime()); if (givenPropertyTypes == null) { throw new EPException("CSV adapter requires a predefined event type name, the event type named '" + spec.getEventTypeName() + "' could not be found"); } coercer.setPropertyTypes(propertyTypes); }