Package org.apache.felix.scr.integration.components.circular

Examples of org.apache.felix.scr.integration.components.circular.B


        delay();

        A a = ( A ) componentA.getComponentInstance().getInstance();
        assertEquals( 1, a.getBs().size() );
        B b = ( B ) componentB.getComponentInstance().getInstance();
        assertEquals( 1, b.getAs().size() );
    }
View Full Code Here


        assertNotNull( serviceA );

        delay();
        A a = ( A ) componentA.getComponentInstance().getInstance();
        assertEquals( 1, a.getBs().size() );
        B b = ( B ) componentB.getComponentInstance().getInstance();
        assertEquals( 1, b.getAs().size() );


        //disabling (removing the A service registration) and re-enabling will
        //result in a service event to B, so B will bind A.
        componentA.disable();
        delay();
        componentA.enable();
        delay();
        ServiceReference[] serviceReferencesA1 = bundleContext.getServiceReferences( A.class.getName(), "(service.pid=" + componentNameA + ")" );
        TestCase.assertEquals( 1, serviceReferencesA1.length );
        ServiceReference serviceReferenceA1 = serviceReferencesA1[0];
        Object serviceA1 = bundleContext.getService( serviceReferenceA1 );
        assertNotNull( serviceA1 );

        A a1 = ( A ) componentA.getComponentInstance().getInstance();
        assertEquals( 1, a1.getBs().size() );
        B b1 = ( B ) componentB.getComponentInstance().getInstance();
        assertEquals( 1, b1.getAs().size() );

    }
View Full Code Here

        String componentNameB = "5.B.0.1.dynamic";
        final Component componentB = findComponentByName( componentNameB );
        TestCase.assertNotNull( componentB );
        TestCase.assertEquals( Component.STATE_ACTIVE, componentB.getState() );
        B b = ( B ) componentB.getComponentInstance().getInstance();
        assertEquals( 1, b.getAs().size() );
    }
View Full Code Here

        String componentNameB = "6.B.0.1.dynamic";
        final Component componentB = findComponentByName( componentNameB );
        TestCase.assertNotNull( componentB );
        TestCase.assertEquals( Component.STATE_ACTIVE, componentB.getState() );
        B b = ( B ) componentB.getComponentInstance().getInstance();
        assertEquals( 1, b.getAs().size() );
    }
View Full Code Here

        assertNotNull( service );

        delay();
        A a = ( A ) componentA.getComponentInstance().getInstance();
        assertEquals( 1, a.getBs().size() );
        B b = ( B ) componentB.getComponentInstance().getInstance();
        assertEquals( 1, b.getAs().size() );
    }
View Full Code Here


        delay();
        A a = ( A ) componentA.getComponentInstance().getInstance();
        assertEquals( 1, a.getBs().size() );
        B b = ( B ) componentB.getComponentInstance().getInstance();
        assertEquals( 1, b.getAs().size() );


        //disabling (removing the A service registration) and re-enabling will
        //result in a service event to B, so B will bind A.
        componentA.disable();
        delay();
        componentA.enable();
        delay();
        ServiceReference[] serviceReferencesA1 = bundleContext.getServiceReferences( A.class.getName(), "(service.pid=" + componentNameA + ")" );
        TestCase.assertEquals( 1, serviceReferencesA1.length );
        ServiceReference serviceReferenceA1 = serviceReferencesA1[0];
        Object serviceA1 = bundleContext.getService( serviceReferenceA1 );
        assertNotNull( serviceA1 );

        A a1 = ( A ) componentA.getComponentInstance().getInstance();
        assertEquals( 1, a1.getBs().size() );
        B b1 = ( B ) componentB.getComponentInstance().getInstance();
        assertEquals( 1, b1.getAs().size() );

    }
View Full Code Here

TOP

Related Classes of org.apache.felix.scr.integration.components.circular.B

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.