Package org.drools.grid

Examples of org.drools.grid.GridServiceDescription


        wp.remove( "s1" );

        assertNull( wp.lookup( "s1" ) );

        GridServiceDescription gs2 = wp.lookup( "s2" );
        assertNotNull( gs2 );
        grid1.get( SocketService.class ).close();

    }
View Full Code Here


        conf.configure( grid2 );

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

        GridServiceDescription test1Gsd = wpClient.create( "test:string@domain1", "grid0" );

        GridServiceDescription testGsd_2 = wpClient.lookup( "test:string@domain1" );
        assertEquals( test1Gsd,
                      testGsd_2 );
        assertNotSame( test1Gsd,
                       testGsd_2 );

        WhitePages localWhitePages = grid1.get( WhitePages.class );
        GridServiceDescription testGsd_3 = localWhitePages.lookup( "test:string@domain1" );

        assertEquals( test1Gsd,
                      testGsd_3 );
        assertNotSame( test1Gsd,
                       testGsd_3 );
View Full Code Here

        conf.configure( grid1 );

        WhitePages wplocal = grid1.get( WhitePages.class );
        assertNotNull( wplocal );
        GridServiceDescription schedulersgsd = wplocal.lookup( "scheduler:" + "myLocalSched1" + SchedulerService.class.getName() );

        assertNotNull( schedulersgsd );

    }
View Full Code Here

        wp.remove( "s1" );

        assertNull( wp.lookup( "s1" ) );

        GridServiceDescription gs2 = wp.lookup( "s2" );
        assertNotNull( gs2 );

    }
View Full Code Here

    }

    public GridServiceDescription create(String serviceDescriptionId) {
        EntityManager em = emf.createEntityManager();
        em.getTransaction().begin();
        GridServiceDescription gsd = new GridServiceDescriptionImpl( serviceDescriptionId );
        em.persist( gsd );
        em.getTransaction().commit();
        em.close();
        return new GridServiceDescriptionJpa( gsd,
                                              emf );
View Full Code Here

        return new GridServiceDescriptionJpa( gsd,
                                              emf );
    }

    public GridServiceDescription lookup(String serviceDescriptionId) {
        GridServiceDescription gsd = this.emf.createEntityManager().find( GridServiceDescriptionImpl.class,
                                                                          serviceDescriptionId );
        return (gsd == null) ? null : new GridServiceDescriptionJpa( gsd,
                                                                     emf );
    }
View Full Code Here

    }

    @Override
    public boolean equals(Object obj) {
        //@TODO: improve equals comparision
        final GridServiceDescription other = (GridServiceDescription) obj;
        if ( !this.getId().equals( other.getId() ) ) {
            return false;
        }
        return true;
    }
View Full Code Here

                                service );
    }

    public GridNode createGridNode(String id) {
        WhitePages wp = get( WhitePages.class );
        GridServiceDescription gsd = wp.create( id );
        gsd.setServiceInterface( GridNode.class );
        GridNode node = new GridNodeImpl( id );
        this.localNodes.put( id, node );
        return node;
    }
View Full Code Here

    }

    @Override
    public boolean equals(Object obj) {
        //@TODO: improve equals comparision
        final GridServiceDescription other = (GridServiceDescription) obj;
        if ( !this.getId().equals( other.getId() ) ) {
            return false;
        }
        return true;
    }
View Full Code Here

    }

    public GridServiceDescription create(String serviceDescriptionId) {
        EntityManager em = emf.createEntityManager();
        em.getTransaction().begin();
        GridServiceDescription gsd = new GridServiceDescriptionImpl( serviceDescriptionId );
        em.persist( gsd );
        em.getTransaction().commit();
        em.close();
        return new GridServiceDescriptionJpa( gsd,
                                              emf );
View Full Code Here

TOP

Related Classes of org.drools.grid.GridServiceDescription

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.