Package org.drools.impl

Examples of org.drools.impl.StatelessKnowledgeSessionImpl$DelegatingGlobalResolver


            return this.kbase;
        }
    }

    public StatelessKnowledgeSession newStatelessKnowledgeSession() {
        return new StatelessKnowledgeSessionImpl( null,
                                                  this,
                                                  null );
    }
View Full Code Here


                                                  null );
    }

    public StatelessKnowledgeSession newStatelessKnowledgeSession(
                                                                  KnowledgeSessionConfiguration conf) {
        return new StatelessKnowledgeSessionImpl( null,
                                                  this,
                                                  conf );
    }
View Full Code Here

            return this.kbase;
        }
    }

    public StatelessKnowledgeSession newStatelessKnowledgeSession() {
        return new StatelessKnowledgeSessionImpl( null,
                                                  this,
                                                  null );
    }
View Full Code Here

                                                  null );
    }

    public StatelessKnowledgeSession newStatelessKnowledgeSession(
                                                                  KnowledgeSessionConfiguration conf) {
        return new StatelessKnowledgeSessionImpl( null,
                                                  this,
                                                  conf );
    }
View Full Code Here

        KnowledgeAgentImpl kagent3 = (KnowledgeAgentImpl) context.getBean( "kagent3" );
        assertTrue( kagent3.isNewInstance() );
        assertTrue( kagent3.isUseKBaseClassLoaderForCompiling() );

        StatelessKnowledgeSessionImpl ksession1 = (StatelessKnowledgeSessionImpl) context.getBean( "ksession1" );
        assertSame( kbase1.getRuleBase(),
                    ksession1.getRuleBase() );
        assertSame( kagent1,
                    ksession1.getKnowledgeAgent() );

        StatefulKnowledgeSessionImpl ksession2 = (StatefulKnowledgeSessionImpl) context.getBean( "ksession2" );
        assertSame( kbase1.getRuleBase(),
                    ksession2.getRuleBase() );

        StatelessKnowledgeSessionImpl ksession3 = (StatelessKnowledgeSessionImpl) context.getBean( "ksession3" );
        assertSame( kagent2,
                    ksession3.getKnowledgeAgent() );
        assertSame( kbase2.getRuleBase(),
                    ksession3.getRuleBase() );

    }
View Full Code Here

        KnowledgeAgentImpl kagent3 = (KnowledgeAgentImpl) context.getBean( "kagent3" );
        assertTrue( kagent3.isNewInstance() );
        assertTrue( kagent3.isUseKBaseClassLoaderForCompiling() );

        StatelessKnowledgeSessionImpl ksession1 = (StatelessKnowledgeSessionImpl) context.getBean( "ksession1" );
        assertSame( kbase1.getRuleBase(),
                    ksession1.getRuleBase() );
        assertSame( kagent1,
                    ksession1.getKnowledgeAgent() );

        StatefulKnowledgeSessionImpl ksession2 = (StatefulKnowledgeSessionImpl) context.getBean( "ksession2" );
        assertSame( kbase1.getRuleBase(),
                    ksession2.getRuleBase() );

        StatelessKnowledgeSessionImpl ksession3 = (StatelessKnowledgeSessionImpl) context.getBean( "ksession3" );
        assertSame( kagent2,
                    ksession3.getKnowledgeAgent() );
        assertSame( kbase2.getRuleBase(),
                    ksession3.getRuleBase() );

    }
View Full Code Here

    }

    @Test
    public void testStatelessKnowledgeConsoleLogger() throws Exception {
        StatelessKnowledgeSession statelessKnowledgeSession = (StatelessKnowledgeSession) context.getBean( "ConsoleLogger-statelessSession" );
        StatelessKnowledgeSessionImpl impl = (StatelessKnowledgeSessionImpl)statelessKnowledgeSession;
        for ( Object listener : impl.workingMemoryEventSupport.getEventListeners()){
            assertTrue(listener instanceof WorkingMemoryConsoleLogger);
        }
    }
View Full Code Here

    }

    @Test
    public void testStatelessKnowledgeFileLogger() throws Exception {
        StatelessKnowledgeSession statelessKnowledgeSession = (StatelessKnowledgeSession) context.getBean( "FileLogger-statelessSession" );
        StatelessKnowledgeSessionImpl impl = (StatelessKnowledgeSessionImpl)statelessKnowledgeSession;
        for ( Object listener : impl.workingMemoryEventSupport.getEventListeners()){
            assertTrue(listener instanceof WorkingMemoryFileLogger);
        }
        KnowledgeLoggerAdaptor adaptor = (KnowledgeLoggerAdaptor) context.getBean("ss_fl_logger");
        assertNotNull(adaptor);
View Full Code Here

    }

    @Test
    public void testStatelessKnowledgeThreadedFileLogger() throws Exception {
        StatelessKnowledgeSession statelessKnowledgeSession = (StatelessKnowledgeSession) context.getBean( "ThreadedFileLogger-statelessSession" );
        StatelessKnowledgeSessionImpl impl = (StatelessKnowledgeSessionImpl)statelessKnowledgeSession;
        for ( Object listener : impl.workingMemoryEventSupport.getEventListeners()){
            assertTrue(listener instanceof ThreadedWorkingMemoryFileLogger);
        }
        KnowledgeLoggerAdaptor loggerAdaptor = (KnowledgeLoggerAdaptor) context.getBean("ss_tfl_logger");
        assertNotNull(loggerAdaptor);
View Full Code Here

    }

    @Test
    public void testKSessionLoggersFromGroupAndNested() throws Exception {
        StatelessKnowledgeSession statelessKnowledgeSession = (StatelessKnowledgeSession) context.getBean( "k1" );
        StatelessKnowledgeSessionImpl impl = (StatelessKnowledgeSessionImpl)statelessKnowledgeSession;
        assertEquals(2, impl.workingMemoryEventSupport.getEventListeners().size());

        List list = new ArrayList();
        statelessKnowledgeSession.setGlobal("list", list);
        assertNotNull(statelessKnowledgeSession.getGlobals().get("list"));
View Full Code Here

TOP

Related Classes of org.drools.impl.StatelessKnowledgeSessionImpl$DelegatingGlobalResolver

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.