Package org.drools.core

Examples of org.drools.core.SessionConfiguration


    public KieSessionConfiguration newKieSessionConfiguration() {
        return new SessionConfiguration();
    }

    public KieSessionConfiguration newKieSessionConfiguration(Properties properties) {
        return new SessionConfiguration(properties);
    }
View Full Code Here


    public SingleSessionCommandService(KieBase kbase,
                                       KieSessionConfiguration conf,
                                       Environment env) {
        if ( conf == null ) {
            conf = new SessionConfiguration();
        }
        this.env = env;

        checkEnvironment( this.env );
View Full Code Here

    public SingleSessionCommandService(Integer sessionId,
                                       KieBase kbase,
                                       KieSessionConfiguration conf,
                                       Environment env) {
        if ( conf == null ) {
            conf = new SessionConfiguration();
        }

        this.env = env;

        checkEnvironment( this.env );
View Full Code Here

      
    private AbstractWorkingMemory createWorkingMemory(RuleBase ruleBase) {
        // WorkingMemoryEntryPoint
        KieSessionConfiguration ksconf = KnowledgeBaseFactory.newKnowledgeSessionConfiguration();
        ksconf.setOption( ClockTypeOption.get( "pseudo" ) );
        SessionConfiguration sessionConf = ((SessionConfiguration) ksconf);
        AbstractWorkingMemory wm = new AbstractWorkingMemory(1, (InternalRuleBase) ruleBase, true, sessionConf, EnvironmentFactory.newEnvironment());
       
        return wm;
    }
View Full Code Here

        rule.setTimer( new DurationTimer( 10000 ) );
        rule.setPackage( "test" );
        impl.pkg.addRule( rule );

        knowledgeBase.addKnowledgePackages( Collections.singleton( (KnowledgePackage) impl ) );
        SessionConfiguration config = new SessionConfiguration();
        config.setClockType( ClockType.PSEUDO_CLOCK );
        StatefulKnowledgeSession ksession = knowledgeBase.newStatefulKnowledgeSession( config, KnowledgeBaseFactory.newEnvironment() );
        PseudoClockScheduler scheduler = (PseudoClockScheduler) ksession.<SessionClock> getSessionClock();
        Marshaller marshaller = MarshallerFactory.newMarshaller( knowledgeBase );

        ksession.insert( "cheese" );
View Full Code Here

    public KieBaseConfiguration newKieBaseConfiguration(Properties properties, ClassLoader classLoader) {
        return new RuleBaseConfiguration(properties, classLoader);
   }

    public KieSessionConfiguration newKieSessionConfiguration() {
        return new SessionConfiguration();
    }
View Full Code Here

    public KieSessionConfiguration newKieSessionConfiguration() {
        return new SessionConfiguration();
    }

    public KieSessionConfiguration newKieSessionConfiguration(Properties properties) {
        return new SessionConfiguration(properties);
    }
View Full Code Here

                                 context,
                                 workingMemory );
    }

    public StatefulSession newStatefulSession(boolean keepReference) {
        SessionConfiguration config = new SessionConfiguration();
        config.setKeepReference( keepReference );

        return newStatefulSession( config,
                                   EnvironmentFactory.newEnvironment() );
    }
View Full Code Here

            throw new RuleExecutionSetNotFoundException( "no execution set bound to: " + bindUri );
        }

        this.setRuleExecutionSet( ruleSet );

        SessionConfiguration conf = new SessionConfiguration();
        conf.setKeepReference( true );
        initSession( conf );
    }
View Full Code Here

     * A reset will not reset the state on the default object filter for a
     * <code>RuleExecutionSet</code>.
     */
    public void reset() {
        // stateful rule sessions should not be high load, thus safe to keep references
        initSession( new SessionConfiguration() );
    }
View Full Code Here

TOP

Related Classes of org.drools.core.SessionConfiguration

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.