Package org.drools.grid.service.directory

Examples of org.drools.grid.service.directory.WhitePages.create()


    public GridNode createGridNode( String id ) {
        if ( logger.isDebugEnabled() ) {
            logger.debug( " ### GridImpl: Registering in white pages (grid = " + getId() + ") new node = " + id );
        }
        WhitePages wp = get( WhitePages.class );
        GridServiceDescription gsd = wp.create( id, this.id );
        gsd.setServiceInterface( GridNode.class );
        GridNode node = new GridNodeImpl( id );
        this.localNodes.put( id , node );
        return node;
    }
View Full Code Here


        if ( logger.isDebugEnabled() ) {
            logger.debug( " ### GridImpl: Claiming orphan node " + id + " found in white pages (grid = " + getId() + ") " );
        }
        WhitePages wp = get( WhitePages.class );
        wp.remove( id );
        GridServiceDescription gsd = wp.create( id, this.id );
        gsd.setServiceInterface( GridNode.class );
        GridNode node = new GridNodeImpl( id );
        this.localNodes.put( id , node );
        return node;
    }
View Full Code Here

        WhitePages wp = grid.get(WhitePages.class);

        GridServiceDescription<GridNode> gsd = wp.lookup(id);
        if (gsd
                == null) {
            gsd = wp.create( id, grid.getId() );
        }

        gsd.setServiceInterface(GridNode.class);

        gsd.addAddress( "socket" ).setObject( new InetSocketAddress( ip, port ) );
View Full Code Here

        conf.configure( grid );

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

        WhitePages pages = grid.get( WhitePages.class );
        GridServiceDescription<GridNode> gsd = pages.create( "test1@local", "grid0" );
       
        GridServiceDescription<GridNode> serviceDescription = pages.lookup( "test1@local" );

        GridConnection connection = grid.get( ConnectionFactoryService.class ).createConnection( gsd );
        assertSame( gnode,
View Full Code Here

    @Test
    public void test1() {
        EntityManagerFactory emf = Persistence.createEntityManagerFactory( "org.drools.grid" );
        WhitePages wp = new WhitePagesImpl();

        GridServiceDescription<WhitePages> gsd1 = wp.create( WhitePages.class.getName() );
        gsd1.setServiceInterfaceWhitePages.class );
        gsd1.addAddress( "socket" ).setObject( new InetSocketAddress( "127.0.0.1",
                                                                      5011 ) );
        gsd1.addAddress( "p1" ).setObject( "v1" );
View Full Code Here

        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" );

        GridConnection connection = grid.get( ConnectionFactoryService.class ).createConnection( gsd );
        assertSame( gnode,
View Full Code Here

        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" );

        GridConnection connection = grid.get( ConnectionFactoryService.class ).createConnection( gsd );
        assertSame( gnode,
View Full Code Here

        conf.configure( grid2 );

        WhitePages wp = grid2.get( WhitePages.class );

        wp.create( "s1" );
        wp.create( "s2" );
        wp.create( "s3" );

        GridServiceDescription<String> gs1 = wp.lookup( "s1" );
View Full Code Here

        conf.configure( grid2 );

        WhitePages wp = grid2.get( WhitePages.class );

        wp.create( "s1" );
        wp.create( "s2" );
        wp.create( "s3" );

        GridServiceDescription<String> gs1 = wp.lookup( "s1" );

        gs1.addAddress( "p1" ).setObject( "v1" );
View Full Code Here

        WhitePages wp = grid2.get( WhitePages.class );

        wp.create( "s1" );
        wp.create( "s2" );
        wp.create( "s3" );

        GridServiceDescription<String> gs1 = wp.lookup( "s1" );

        gs1.addAddress( "p1" ).setObject( "v1" );
        gs1.addAddress( "p2" ).setObject( "v2" );
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.