Ejemplo n.º 1
0
        // settable for view-sharing

        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="stmtEngineServices">is the engine services for the statement</param>
        /// <param name="schedulingService">implementation for schedule registration</param>
        /// <param name="scheduleBucket">is for ordering scheduled callbacks within the view statements</param>
        /// <param name="epStatementHandle">is the statements-own handle for use in registering callbacks with services</param>
        /// <param name="viewResultionService">is a service for resolving view namespace and name to a view factory</param>
        /// <param name="patternResolutionService">is the service that resolves pattern objects for the statement</param>
        /// <param name="statementExtensionSvcContext">provide extension points for custom statement resources</param>
        /// <param name="statementStopService">for registering a callback invoked when a statement is stopped</param>
        /// <param name="methodResolutionService">is a service for resolving static methods and aggregation functions</param>
        /// <param name="patternContextFactory">is the pattern-level services and context information factory</param>
        /// <param name="filterService">is the filtering service</param>
        /// <param name="statementResultService">handles awareness of listeners/subscriptions for a statement customizing output produced</param>
        /// <param name="internalEventEngineRouteDest">routing destination</param>
        /// <param name="annotations">The annotations.</param>
        /// <param name="statementAgentInstanceRegistry">The statement agent instance registry.</param>
        /// <param name="defaultAgentInstanceLock">The default agent instance lock.</param>
        /// <param name="contextDescriptor">The context descriptor.</param>
        /// <param name="patternSubexpressionPoolSvc">The pattern subexpression pool SVC.</param>
        /// <param name="matchRecognizeStatePoolStmtSvc">The match recognize state pool statement SVC.</param>
        /// <param name="statelessSelect">if set to <c>true</c> [stateless select].</param>
        /// <param name="contextControllerFactoryService">The context controller factory service.</param>
        /// <param name="defaultAgentInstanceScriptContext">The default agent instance script context.</param>
        /// <param name="aggregationServiceFactoryService">The aggregation service factory service.</param>
        /// <param name="scriptingService">The scripting service.</param>
        /// <param name="writesToTables">if set to <c>true</c> [writes to tables].</param>
        /// <param name="statementUserObject">The statement user object.</param>
        /// <param name="statementSemiAnonymousTypeRegistry">The statement semi anonymous type registry.</param>
        /// <param name="priority">The priority.</param>
        public StatementContext(
            StatementContextEngineServices stmtEngineServices,
            SchedulingService schedulingService,
            ScheduleBucket scheduleBucket,
            EPStatementHandle epStatementHandle,
            ViewResolutionService viewResultionService,
            PatternObjectResolutionService patternResolutionService,
            StatementExtensionSvcContext statementExtensionSvcContext,
            StatementStopService statementStopService,
            MethodResolutionService methodResolutionService,
            PatternContextFactory patternContextFactory,
            FilterService filterService,
            StatementResultService statementResultService,
            InternalEventRouteDest internalEventEngineRouteDest,
            Attribute[] annotations,
            StatementAIResourceRegistry statementAgentInstanceRegistry,
            IReaderWriterLock defaultAgentInstanceLock,
            ContextDescriptor contextDescriptor,
            PatternSubexpressionPoolStmtSvc patternSubexpressionPoolSvc,
            MatchRecognizeStatePoolStmtSvc matchRecognizeStatePoolStmtSvc,
            bool statelessSelect,
            ContextControllerFactoryService contextControllerFactoryService,
            AgentInstanceScriptContext defaultAgentInstanceScriptContext,
            AggregationServiceFactoryService aggregationServiceFactoryService,
            ScriptingService scriptingService,
            bool writesToTables,
            object statementUserObject,
            StatementSemiAnonymousTypeRegistry statementSemiAnonymousTypeRegistry,
            int priority)
        {
            _stmtEngineServices               = stmtEngineServices;
            SchedulingService                 = schedulingService;
            ScheduleBucket                    = scheduleBucket;
            EpStatementHandle                 = epStatementHandle;
            ViewResolutionService             = viewResultionService;
            PatternResolutionService          = patternResolutionService;
            StatementExtensionServicesContext = statementExtensionSvcContext;
            StatementStopService              = statementStopService;
            MethodResolutionService           = methodResolutionService;
            PatternContextFactory             = patternContextFactory;
            FilterService                = filterService;
            _statementResultService      = statementResultService;
            InternalEventEngineRouteDest = internalEventEngineRouteDest;
            ScheduleAdjustmentService    = stmtEngineServices.ConfigSnapshot.EngineDefaults.ExecutionConfig.IsAllowIsolatedService ? new ScheduleAdjustmentService() : null;
            Annotations = annotations;
            StatementAgentInstanceRegistry = statementAgentInstanceRegistry;
            DefaultAgentInstanceLock       = defaultAgentInstanceLock;
            ContextDescriptor                 = contextDescriptor;
            PatternSubexpressionPoolSvc       = patternSubexpressionPoolSvc;
            MatchRecognizeStatePoolStmtSvc    = matchRecognizeStatePoolStmtSvc;
            IsStatelessSelect                 = statelessSelect;
            ContextControllerFactoryService   = contextControllerFactoryService;
            DefaultAgentInstanceScriptContext = defaultAgentInstanceScriptContext;
            AggregationServiceFactoryService  = aggregationServiceFactoryService;
            ScriptingService    = scriptingService;
            IsWritesToTables    = writesToTables;
            StatementUserObject = statementUserObject;
            StatementSemiAnonymousTypeRegistry = statementSemiAnonymousTypeRegistry;
            Priority = priority;
        }
Ejemplo n.º 2
0
        public void TestInitializeFromConfig()
        {
            _service = CreateService(
                new[] { "a", "b" },
                new[] { "v1", "v2" },
                new[] { typeof(SupportViewFactoryOne).FullName, typeof(SupportViewFactoryTwo).FullName });

            var factory = _service.Create(_container, "a", "v1");

            Assert.IsTrue(factory is SupportViewFactoryOne);

            factory = _service.Create(_container, "b", "v2");
            Assert.IsTrue(factory is SupportViewFactoryTwo);

            TryInvalid("a", "v3");
            TryInvalid("c", "v1");

            try
            {
                _service = CreateService(new[] { "a" }, new[] { "v1" }, new[] { "abc" });
                Assert.Fail();
            }
            catch (ConfigurationException)
            {
                // expected
            }
        }
Ejemplo n.º 3
0
        public void SetUp()
        {
            _container = SupportContainer.Reset();

            var registry = new PluggableObjectRegistryImpl(new[] { ViewEnumHelper.BuiltinViews });

            _service = new ViewResolutionServiceImpl(registry, null, null);
        }
Ejemplo n.º 4
0
        public ModuleCompileTimeServices(
            IContainer container,
            CompilerServices compilerServices,
            Configuration configuration,
            ContextCompileTimeRegistry contextCompileTimeRegistry,
            ContextCompileTimeResolver contextCompileTimeResolver,
            BeanEventTypeStemService beanEventTypeStemService,
            BeanEventTypeFactoryPrivate beanEventTypeFactoryPrivate,
            ClassProvidedCompileTimeRegistry classProvidedCompileTimeRegistry,
            ClassProvidedCompileTimeResolver classProvidedCompileTimeResolver,
            DatabaseConfigServiceCompileTime databaseConfigServiceCompileTime,
            ImportServiceCompileTime importService,
            ExprDeclaredCompileTimeRegistry exprDeclaredCompileTimeRegistry,
            ExprDeclaredCompileTimeResolver exprDeclaredCompileTimeResolver,
            EventTypeAvroHandler eventTypeAvroHandler,
            EventTypeCompileTimeRegistry eventTypeCompileTimeRegistry,
            EventTypeCompileTimeResolver eventTypeCompileTimeResolver,
            EventTypeRepositoryImpl eventTypeRepositoryPreconfigured,
            bool fireAndForget,
            IndexCompileTimeRegistry indexCompileTimeRegistry,
            ModuleDependenciesCompileTime moduleDependencies,
            ModuleAccessModifierService moduleVisibilityRules,
            NamedWindowCompileTimeResolver namedWindowCompileTimeResolver,
            NamedWindowCompileTimeRegistry namedWindowCompileTimeRegistry,
            ParentClassLoader parentClassLoader,
            PatternObjectResolutionService patternObjectResolutionService,
            ScriptCompileTimeRegistry scriptCompileTimeRegistry,
            ScriptCompileTimeResolver scriptCompileTimeResolver,
            ScriptCompiler scriptCompiler,
            SerdeEventTypeCompileTimeRegistry serdeEventTypeRegistry,
            SerdeCompileTimeResolver serdeResolver, 
            TableCompileTimeRegistry tableCompileTimeRegistry,
            TableCompileTimeResolver tableCompileTimeResolver,
            VariableCompileTimeRegistry variableCompileTimeRegistry,
            VariableCompileTimeResolver variableCompileTimeResolver,
            ViewResolutionService viewResolutionService,
            XMLFragmentEventTypeFactory xmlFragmentEventTypeFactory)
        {
            var generation = Interlocked.Increment(ref _generation);
            
            Namespace = $"generation_{generation}";

            Container = container;
            CompilerServices = compilerServices;
            Configuration = configuration;
            ContextCompileTimeRegistry = contextCompileTimeRegistry;
            ContextCompileTimeResolver = contextCompileTimeResolver;
            BeanEventTypeStemService = beanEventTypeStemService;
            BeanEventTypeFactoryPrivate = beanEventTypeFactoryPrivate;
            DatabaseConfigServiceCompileTime = databaseConfigServiceCompileTime;
            ImportServiceCompileTime = importService;
            ExprDeclaredCompileTimeRegistry = exprDeclaredCompileTimeRegistry;
            ExprDeclaredCompileTimeResolver = exprDeclaredCompileTimeResolver;
            EventTypeAvroHandler = eventTypeAvroHandler;
            EventTypeCompileTimeRegistry = eventTypeCompileTimeRegistry;
            EventTypeCompileTimeResolver = eventTypeCompileTimeResolver;
            EventTypeRepositoryPreconfigured = eventTypeRepositoryPreconfigured;
            IndexCompileTimeRegistry = indexCompileTimeRegistry;
            ModuleDependencies = moduleDependencies;
            ModuleVisibilityRules = moduleVisibilityRules;
            NamedWindowCompileTimeResolver = namedWindowCompileTimeResolver;
            NamedWindowCompileTimeRegistry = namedWindowCompileTimeRegistry;
            ParentClassLoader = parentClassLoader;
            PatternObjectResolutionService = patternObjectResolutionService;
            ScriptCompileTimeRegistry = scriptCompileTimeRegistry;
            ScriptCompileTimeResolver = scriptCompileTimeResolver;
            ScriptCompiler = scriptCompiler;
            TableCompileTimeRegistry = tableCompileTimeRegistry;
            TableCompileTimeResolver = tableCompileTimeResolver;
            VariableCompileTimeRegistry = variableCompileTimeRegistry;
            VariableCompileTimeResolver = variableCompileTimeResolver;
            ViewResolutionService = viewResolutionService;
            XmlFragmentEventTypeFactory = xmlFragmentEventTypeFactory;

            #region ESPER_8.5.1
            ClassProvidedCompileTimeRegistry = classProvidedCompileTimeRegistry;
            ClassProvidedCompileTimeResolver = classProvidedCompileTimeResolver;
            SerdeEventTypeRegistry = serdeEventTypeRegistry;
            SerdeResolver = serdeResolver;
            IsFireAndForget = fireAndForget;
            #endregion
        }
Ejemplo n.º 5
0
        public void SetUp()
        {
            PluggableObjectRegistryImpl registry = new PluggableObjectRegistryImpl(new PluggableObjectCollection[] { ViewEnumHelper.BuiltinViews });

            _service = new ViewResolutionServiceImpl(registry, null, null);
        }
Ejemplo n.º 6
0
 public ModuleCompileTimeServices(
     IContainer container,
     CompilerServices compilerServices,
     Configuration configuration,
     ContextCompileTimeRegistry contextCompileTimeRegistry,
     ContextCompileTimeResolver contextCompileTimeResolver,
     BeanEventTypeStemService beanEventTypeStemService,
     BeanEventTypeFactoryPrivate beanEventTypeFactoryPrivate,
     DatabaseConfigServiceCompileTime databaseConfigServiceCompileTime,
     ImportServiceCompileTime importService,
     ExprDeclaredCompileTimeRegistry exprDeclaredCompileTimeRegistry,
     ExprDeclaredCompileTimeResolver exprDeclaredCompileTimeResolver,
     EventTypeAvroHandler eventTypeAvroHandler,
     EventTypeCompileTimeRegistry eventTypeCompileTimeRegistry,
     EventTypeCompileTimeResolver eventTypeCompileTimeResolver,
     EventTypeRepositoryImpl eventTypeRepositoryPreconfigured,
     IndexCompileTimeRegistry indexCompileTimeRegistry,
     ModuleDependenciesCompileTime moduleDependencies,
     ModuleAccessModifierService moduleVisibilityRules,
     NamedWindowCompileTimeResolver namedWindowCompileTimeResolver,
     NamedWindowCompileTimeRegistry namedWindowCompileTimeRegistry,
     PatternObjectResolutionService patternObjectResolutionService,
     ScriptCompileTimeRegistry scriptCompileTimeRegistry,
     ScriptCompileTimeResolver scriptCompileTimeResolver,
     ScriptServiceCompileTime scriptServiceCompileTime,
     TableCompileTimeRegistry tableCompileTimeRegistry,
     TableCompileTimeResolver tableCompileTimeResolver,
     VariableCompileTimeRegistry variableCompileTimeRegistry,
     VariableCompileTimeResolver variableCompileTimeResolver,
     ViewResolutionService viewResolutionService,
     XMLFragmentEventTypeFactory xmlFragmentEventTypeFactory)
 {
     Container = container;
     CompilerServices = compilerServices;
     Configuration = configuration;
     ContextCompileTimeRegistry = contextCompileTimeRegistry;
     ContextCompileTimeResolver = contextCompileTimeResolver;
     BeanEventTypeStemService = beanEventTypeStemService;
     BeanEventTypeFactoryPrivate = beanEventTypeFactoryPrivate;
     DatabaseConfigServiceCompileTime = databaseConfigServiceCompileTime;
     ImportServiceCompileTime = importService;
     ExprDeclaredCompileTimeRegistry = exprDeclaredCompileTimeRegistry;
     ExprDeclaredCompileTimeResolver = exprDeclaredCompileTimeResolver;
     EventTypeAvroHandler = eventTypeAvroHandler;
     EventTypeCompileTimeRegistry = eventTypeCompileTimeRegistry;
     EventTypeCompileTimeResolver = eventTypeCompileTimeResolver;
     EventTypeRepositoryPreconfigured = eventTypeRepositoryPreconfigured;
     IndexCompileTimeRegistry = indexCompileTimeRegistry;
     ModuleDependencies = moduleDependencies;
     ModuleVisibilityRules = moduleVisibilityRules;
     NamedWindowCompileTimeResolver = namedWindowCompileTimeResolver;
     NamedWindowCompileTimeRegistry = namedWindowCompileTimeRegistry;
     PatternObjectResolutionService = patternObjectResolutionService;
     ScriptServiceCompileTime = scriptServiceCompileTime;
     ScriptCompileTimeRegistry = scriptCompileTimeRegistry;
     ScriptCompileTimeResolver = scriptCompileTimeResolver;
     TableCompileTimeRegistry = tableCompileTimeRegistry;
     TableCompileTimeResolver = tableCompileTimeResolver;
     VariableCompileTimeRegistry = variableCompileTimeRegistry;
     VariableCompileTimeResolver = variableCompileTimeResolver;
     ViewResolutionService = viewResolutionService;
     XmlFragmentEventTypeFactory = xmlFragmentEventTypeFactory;
 }