Package com.espertech.esper.core

Examples of com.espertech.esper.core.EPServiceProviderSPI


  private void finishInitialization(EPServiceProvider epService, CSVInputAdapterSpec spec)
  {
    assertValidParameters(epService, spec);

    EPServiceProviderSPI spi = (EPServiceProviderSPI)epService;

    scheduleSlot = spi.getSchedulingMgmtService().allocateBucket().allocateSlot();

    reader = new CSVReader(spec.getAdapterInputSource());
    reader.setLooping(spec.isLooping());

    String[] firstRow = getFirstRow();

    Map<String, Object> givenPropertyTypes = constructPropertyTypes(spec.geteventTypeName(), spec.getPropertyTypes(), spi.getEventAdapterService());

    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);
    if(givenPropertyTypes == null)
    {
      spi.getEventAdapterService().addNestableMapType(eventTypeName, new HashMap<String, Object>(propertyTypes), null, true, true, true, false, false);
    }

    coercer.setPropertyTypes(propertyTypes);
  }
View Full Code Here


        if (log.isInfoEnabled())
        {
            log.info("Starting EsperIO DB Adapter for engine URI '" + engineURI + "'");
        }

        EPServiceProviderSPI engineSPI = (EPServiceProviderSPI) EPServiceProviderManager.getProvider(engineURI);

        databaseConfigSvc = new DatabaseConfigServiceImpl(config.getJdbcConnections(), null, null);
        executorFactory = new ExecutorServices(engineSPI, config.getExecutors());

        // Handle Upserts
View Full Code Here

        if (log.isInfoEnabled())
        {
            log.info("Starting EsperIO HTTP Adapter for engine URI '" + engineURI + "'");
        }

        EPServiceProviderSPI engineSPI = (EPServiceProviderSPI) EPServiceProviderManager.getProvider(engineURI);

        // Start requests (output adapter)
        for (Request request : config.getRequests()) {

            EventType eventType = engineSPI.getEventAdapterService().getExistsTypeByName(request.getStream());
            if (eventType == null) {
                throw new ConfigurationException("Event type by name '" + request.getStream() + "' not found");
            }

            try {
View Full Code Here

        if (log.isInfoEnabled())
        {
            log.info("Starting EsperIO Socket Adapter for engine URI '" + engineURI + "'");
        }

        EPServiceProviderSPI engineSPI = (EPServiceProviderSPI) EPServiceProviderManager.getProvider(engineURI);

        // Configure sockets (input adapter)
        Set<Integer> ports = new HashSet<Integer>();
        for (Map.Entry<String, SocketConfig> entry : config.getSockets().entrySet()) {
            if (sockets.containsKey(entry.getKey())) {
View Full Code Here

    {
      String providerURINonNull = (providerURI==null)?EPServiceProviderSPI.DEFAULT_ENGINE_URI:providerURI;
     
        if (runtimes.containsKey(providerURINonNull))
        {
            EPServiceProviderSPI provider = runtimes.get(providerURINonNull);
            if (provider.isDestroyed())
            {
                provider = getProviderInternal(configuration, providerURINonNull);
                runtimes.put(providerURINonNull, provider);
            }
            else
            {
                provider.setConfiguration(configuration);
            }
            return provider;
        }

        // New runtime
        EPServiceProviderSPI runtime = getProviderInternal(configuration, providerURINonNull);
        runtimes.put(providerURINonNull, runtime);
        runtime.postInitialize();

        return runtime;
    }
View Full Code Here

TOP

Related Classes of com.espertech.esper.core.EPServiceProviderSPI

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.