Package org.drools.grid.io.impl

Examples of org.drools.grid.io.impl.CommandImpl


                    ResourceType type,
                    ResourceConfiguration configuration) {

        String localId = UUID.randomUUID().toString();

        CommandImpl cmd = new CommandImpl( "execute",
                                           Arrays.asList( new Object[]{new KnowledgeContextResolveFromContextCommand( new KnowledgeBuilderAddCommand( resource,
                                                                                                                                                       type,
                                                                                                                                                       configuration ),
                                                                                                                       this.instanceId,
                                                                                                                       null,
View Full Code Here


    public KnowledgeBuilderErrors getErrors() {
        String commandId = "kbuilder.getErrors_" + this.gsd.getId();
        String kresultsId = "kresults_" + this.gsd.getId();
        String localId = UUID.randomUUID().toString();

        CommandImpl cmd = new CommandImpl( "execute",
                                           Arrays.asList( new Object[]{new KnowledgeContextResolveFromContextCommand( new KnowledgeBuilderGetErrorsCommand(),
                                                                                                                       this.instanceId,
                                                                                                                       null,
                                                                                                                       null,
                                                                                                                       kresultsId )} ) );
View Full Code Here

        this.whitePages = whitePages;
    }

    public void messageReceived(Conversation conversation,
                                Message msg) {
        final CommandImpl cmd = (CommandImpl) msg.getBody();
        this.execs.get( cmd.getName() ).execute( whitePages,
                                                 conversation,
                                                 msg,
                                                 cmd );
    }
View Full Code Here

        this.data = data;
    }
   
    public void messageReceived(Conversation conversation,
                                Message msg) {
        final CommandImpl cmd = (CommandImpl) msg.getBody();
        this.execs.get( cmd.getName() ).execute( gnode,
                                                 conversation,
                                                 msg,
                                                 cmd );
    }
View Full Code Here

        String kresultsId = "kresults_" + this.gsd.getId();

        InsertObjectCommand insertCmd = new InsertObjectCommand( object,
                                                                 true );
        insertCmd.setEntryPoint( name );
        CommandImpl cmd = new CommandImpl( "execute",
                                           Arrays.asList( new Object[]{new KnowledgeContextResolveFromContextCommand( insertCmd,
                                                                                                                      null,
                                                                                                                      null,
                                                                                                                      this.instanceId,
                                                                                                                      this.name,
View Full Code Here

    }

    public KnowledgeBuilderConfiguration newKnowledgeBuilderConfiguration() {
        String localId = UUID.randomUUID().toString();
        System.out.println("This InstanceId (just generated) = "+localId);
        CommandImpl cmd = new CommandImpl( "execute",
                                           Arrays.asList( new Object[]{ CommandFactory.newNewKnowledgeBuilderConfigurationCommand( localId ) } ) );

        ConversationManager connm = this.grid.get( ConversationManager.class );
        ConversationUtil.sendMessage( connm,
                                      (InetSocketAddress) this.gsd.getAddresses().get( "socket" ).getObject(),
View Full Code Here

        String localId = UUID.randomUUID().toString();
        String remoteConfId = null;
        if(conf != null) {
            remoteConfId = ((KnowledgeBuilderConfigurationRemoteClient)conf).getId();
        }
        CommandImpl cmd = new CommandImpl( "execute",
                                           Arrays.asList( new Object[]{new SetVariableCommand( "__TEMP__",
                                                                                                localId,
                                                                                                new NewKnowledgeBuilderRemoteCommand( remoteConfId ) )} ) );

        ConversationManager connm = this.grid.get( ConversationManager.class );
View Full Code Here

       //We need a way to do it more generic, so we can set whatever we want.
       
       if(object instanceof StatefulKnowledgeSessionRemoteClient){
            String localId = UUID.randomUUID().toString();

            CommandImpl cmd = new CommandImpl( "registerKsession",
                                               Arrays.asList( new Object[]{identifier, ((StatefulKnowledgeSessionRemoteClient)object).getInstanceId()} ) );

            ConversationManager connm = this.grid.get( ConversationManager.class );
            ConversationUtil.sendMessage( connm,
                                          (InetSocketAddress) ((Map<String, Address>)this.gsd.getAddresses()).get( "socket" ).getObject(),
View Full Code Here

    public void addKnowledgePackages(Collection<KnowledgePackage> kpackages) {
        String kuilderInstanceId = ((CollectionClient<KnowledgePackage>) kpackages).getParentInstanceId();
        String kresultsId = "kresults_" + this.cm.toString();
        String localId = UUID.randomUUID().toString();

        CommandImpl cmd = new CommandImpl( "execute",
                                           Arrays.asList( new Object[]{new KnowledgeContextResolveFromContextCommand( new KnowledgeBaseAddKnowledgePackagesCommand(),
                                                                                                                       kuilderInstanceId,
                                                                                                                       this.instanceId,
                                                                                                                       null,
                                                                                                                       kresultsId )} ) );
View Full Code Here

    public StatefulKnowledgeSession newStatefulKnowledgeSession(KnowledgeSessionConfiguration conf,
                                                                Environment environment) {
        String kresultsId = "kresults_" + this.cm.toString();
        String localId = UUID.randomUUID().toString();

        CommandImpl cmd = new CommandImpl( "execute",
                                           Arrays.asList( new Object[]{new SetVariableCommand( "__TEMP__",
                                                                                                localId,
                                                                                                new KnowledgeContextResolveFromContextCommand( new NewStatefulKnowledgeSessionCommand( conf , environment),
                                                                                                                                               null,
                                                                                                                                               this.instanceId,
View Full Code Here

TOP

Related Classes of org.drools.grid.io.impl.CommandImpl

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.