Package org.drools.grid

Examples of org.drools.grid.GridNode


        assertNotNull( gnode );
    }

    @Test
    public void testConnectWithGivenGridNode() {
        GridNode gnode = new GridNodeImpl();
        GridConnection<GridNode> connection = new LocalGridNodeConnection( gnode );
        assertSame( gnode,
                    connection.connect() );
    }
View Full Code Here


    }

    @Test
    public void testGetFactoryService() {
        GridConnection<GridNode> connection = new LocalGridNodeConnection( "test-id" );
        GridNode gnode = connection.connect();
        KnowledgeBuilderFactoryService kbfService = gnode.get( KnowledgeBuilderFactoryService.class );
        assertNotNull( kbfService );
    }
View Full Code Here

    }

    @Test
    public void testSetObject() {
        GridConnection<GridNode> connection = new LocalGridNodeConnection( "test-id" );
        GridNode gnode = connection.connect();

        KnowledgeBaseFactoryService kbfService = gnode.get( KnowledgeBaseFactoryService.class );
        KnowledgeBase kbase = kbfService.newKnowledgeBase();
        gnode.set( "id1",
                   kbase );
        assertSame( kbase,
                    gnode.get( "id1",
                               KnowledgeBase.class ) );
    }
View Full Code Here

        GridPeerServiceConfiguration wplConf = new WhitePagesLocalConfiguration();
        conf.addConfiguration( wplConf );

        conf.configure( grid );

        GridNode gnode = grid.createGridNode( "test1@local" );

        WhitePages pages = grid.get( WhitePages.class );
        GridServiceDescription<GridNode> gsd = pages.create( "test1@local" );
       
        GridServiceDescription<GridNode> serviceDescription = pages.lookup( "test1@local" );
View Full Code Here

        Grid grid2 = new GridImpl( new HashMap<String, Object>() );
        configureGrid1( grid2,
                        -1,
                        grid1.get( WhitePages.class ) );

        GridNode n1 = grid1.createGridNode( "n1" );
        grid1.get( SocketService.class ).addService( "n1", 8000, n1 );
              
        GridServiceDescription<GridNode> n1Gsd = grid2.get( WhitePages.class ).lookup( "n1" );
        GridConnection<GridNode> conn = grid2.get( ConnectionFactoryService.class ).createConnection( n1Gsd );
        remoteN1 = conn.connect();
View Full Code Here

public class LocalGridNodeTest {

    @Test
    public void testConnectWithId() {
        GridConnection<GridNode> connection = new LocalGridNodeConnection( "test-id" );
        GridNode gnode = connection.connect();
        assertNotNull( gnode );
    }
View Full Code Here

        assertNotNull( gnode );
    }

    @Test
    public void testConnectWithGivenGridNode() {
        GridNode gnode = new GridNodeImpl();
        GridConnection<GridNode> connection = new LocalGridNodeConnection( gnode );
        assertSame( gnode,
                    connection.connect() );
    }
View Full Code Here

    }

    @Test
    public void testGetFactoryService() {
        GridConnection<GridNode> connection = new LocalGridNodeConnection( "test-id" );
        GridNode gnode = connection.connect();
        KnowledgeBuilderFactoryService kbfService = gnode.get( KnowledgeBuilderFactoryService.class );
        assertNotNull( kbfService );
    }
View Full Code Here

    }

    @Test
    public void testSetObject() {
        GridConnection<GridNode> connection = new LocalGridNodeConnection( "test-id" );
        GridNode gnode = connection.connect();

        KnowledgeBaseFactoryService kbfService = gnode.get( KnowledgeBaseFactoryService.class );
        KnowledgeBase kbase = kbfService.newKnowledgeBase();
        gnode.set( "id1",
                   kbase );
        assertSame( kbase,
                    gnode.get( "id1",
                               KnowledgeBase.class ) );
    }
View Full Code Here

        GridPeerServiceConfiguration wplConf = new WhitePagesLocalConfiguration();
        conf.addConfiguration( wplConf );

        conf.configure( grid );

        GridNode gnode = grid.createGridNode( "test1@local" );

        WhitePages pages = grid.get( WhitePages.class );
        GridServiceDescription<GridNode> gsd = pages.create( "test1@local");
       
        GridServiceDescription<GridNode> serviceDescription = pages.lookup( "test1@local" );
View Full Code Here

TOP

Related Classes of org.drools.grid.GridNode

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.