Package org.drools.core.command.impl

Examples of org.drools.core.command.impl.ContextImpl


    }

    public <T> T execute(Command<T> command) {
        StatefulKnowledgeSession ksession = newWorkingMemory();

        FixedKnowledgeCommandContext context = new FixedKnowledgeCommandContext( new ContextImpl( "ksession",
                                                                                        null ),
                                                                       null,
                                                                       null,
                                                                       ksession,
                                                                       null );
View Full Code Here


        //  this.clock = clock;
        this.ksessions = new HashSet<StatefulKnowledgeSession>();

        this.startTime = startTime;
        this.simulation = (SimulationImpl) simulation;
        this.root = new ContextImpl( ROOT,
                                     this );
       
        this.root.set( "simulator",
                       this );

        this.contexts = new HashMap<String, Context>();
        this.contexts.put( ROOT,
                           this.root );

        Map<String, SimulationPath> paths = this.simulation.getPaths();

        // calculate capacity
        int capacity = 0;
        for ( SimulationPath path : paths.values() ) {
            this.contexts.put( path.getName(),
                               new ContextImpl( path.getName(),
                                                this,
                                                root ) );

            capacity += path.getSteps().size();
        }
View Full Code Here

    }

    public <T> T execute(Command<T> command) {
        StatefulKnowledgeSession ksession = newWorkingMemory();

        FixedKnowledgeCommandContext context = new FixedKnowledgeCommandContext( new ContextImpl( "ksession",
                                                                                                  null ),
                                                                                 null,
                                                                                 null,
                                                                                 ksession,
                                                                                 null );
View Full Code Here

        this.sessionInfo.setJPASessionMashallingHelper( this.marshallingHelper );
       
        ((InternalKnowledgeRuntime) this.ksession).setEndOperationListener( new EndOperationListenerImpl( this.sessionInfo ) );
       
        this.kContext = new FixedKnowledgeCommandContext( new ContextImpl( "ksession", null),
                                                          null,
                                                          null,
                                                          this.ksession,
                                                          null );
View Full Code Here

        ((InternalKnowledgeRuntime) this.ksession).setEndOperationListener( new EndOperationListenerImpl( this.sessionInfo ) );

        if ( this.kContext == null ) {
            // this should only happen when this class is first constructed
            this.kContext = new FixedKnowledgeCommandContext( new ContextImpl( "ksession", null),
                                                              null,
                                                              null,
                                                              this.ksession,
                                                              null );
        }
View Full Code Here

    }

    public <T> T execute(Command<T> command) {
        newWorkingMemory();

        FixedKnowledgeCommandContext context = new FixedKnowledgeCommandContext( new ContextImpl( "ksession",
                                                                                                  null ),
                                                                                 null,
                                                                                 null,
                                                                                 ksession,
                                                                                 null );
View Full Code Here

    private CommandExecutionHandler       executionHandler = new DefaultCommandExecutionHandler();

    private Object                        lastReturnValue;

    public WorldImpl() {
        this.root = new ContextImpl( ROOT,
                                     this );
       
        this.root.set( "world",
                       this );
View Full Code Here

    }
   
    public Context createContext(String identifier) {
        Context ctx = this.contexts.getidentifier );
        if ( ctx == null ) {
            ctx = new ContextImpl( identifier, this, root );
            this.contexts.putidentifier, ctx );
        }
       
        return ctx;
    }
View Full Code Here

TOP

Related Classes of org.drools.core.command.impl.ContextImpl

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.