Package org.drools.grid.io

Examples of org.drools.grid.io.ConversationManager


                                         8000 ),
                  accHandler,
                  l );


        ConversationManager cm = new ConversationManagerImpl( new GridImpl("peer"),
                                                              l );

        Conversation cv = cm.startConversation( "s1",
                                                new InetSocketAddress( "127.0.0.1",
                                                                       8000 ),
                                                                       "r1" );

        BlockingMessageResponseHandler blockHandler = new BlockingMessageResponseHandler();
View Full Code Here


        CommandImpl cmd = new CommandImpl( "execute",
                                           Arrays.asList( new Object[]{new SetVariableCommand( "__TEMP__",
                                                                                                localId,
                                                                                                new NewKnowledgeBaseCommand( conf ) )} ) );
        ConversationManager connm = this.grid.get( ConversationManager.class );
        ConversationUtil.sendMessage( connm,
                                      (InetSocketAddress) this.gsd.getAddresses().get( "socket" ).getObject(),
                                      this.gsd.getId(),
                                      cmd );
View Full Code Here

        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(),
                                      this.gsd.getId(),
                                      cmd );
View Full Code Here

        CommandImpl cmd = new CommandImpl( "execute",
                                           Arrays.asList( new Object[]{new SetVariableCommand( "__TEMP__",
                                                                                                localId,
                                                                                                new NewKnowledgeBuilderRemoteCommand( remoteConfId ) )} ) );

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

            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(),
                                          this.gsd.getId(),
                                          cmd );
       } else{
View Full Code Here

        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(),
                                      this.gsd.getId(),
                                      cmd );
View Full Code Here

        CommandImpl cmd = new CommandImpl( "execute",
                                           Arrays.asList( new Object[]{new SetVariableCommandFromCommand( "__TEMP__",
                                                                                                          localId,
                                                                                                          new NewKnowledgeBuilderRemoteCommand( remoteConfId ) )} ) );

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

    public GridServiceDescription create(String serviceDescriptionId) {
        GridServiceDescription<WhitePages> wpGsd = getGsd();
        InetSocketAddress[] sockets = (InetSocketAddress[]) ((Address) wpGsd.getAddresses().get( "socket" )).getObject();
        CommandImpl cmd = new CommandImpl( "WhitePages.create",
                                           Arrays.asList( new Object[]{serviceDescriptionId} ) );
        ConversationManager convm = this.grid.get( ConversationManager.class );
        GridServiceDescription gsd = (GridServiceDescription) sendMessage( convm,
                                                                           sockets,
                                                                           wpGsd.getId(),
                                                                           cmd );
        return new GridServiceDescriptionClient( gsd,
View Full Code Here

    public GridServiceDescription lookup(String serviceDescriptionId) {
        GridServiceDescription<WhitePages> wpGsd = getGsd();
        InetSocketAddress[] sockets = (InetSocketAddress[]) ((Address) wpGsd.getAddresses().get( "socket" )).getObject();
        CommandImpl cmd = new CommandImpl( "WhitePages.lookup",
                                           Arrays.asList( new Object[]{serviceDescriptionId} ) );
        ConversationManager convm = this.grid.get( ConversationManager.class );
        GridServiceDescription gsd = (GridServiceDescription) sendMessage( convm,
                                                                           sockets,
                                                                           wpGsd.getId(),
                                                                           cmd );
        return (gsd == null) ? gsd : new GridServiceDescriptionClient( gsd,
View Full Code Here

        GridServiceDescription<WhitePages> wpGsd = getGsd();

        InetSocketAddress[] sockets = (InetSocketAddress[]) ((Address) wpGsd.getAddresses().get( "socket" )).getObject();
        CommandImpl cmd = new CommandImpl( "WhitePages.remove",
                                           Arrays.asList( new Object[]{serviceDescriptionId} ) );
        ConversationManager convm = this.grid.get( ConversationManager.class );
        sendMessage( convm,
                     sockets,
                     wpGsd.getId(),
                     cmd );
    }
View Full Code Here

TOP

Related Classes of org.drools.grid.io.ConversationManager

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.