Package org.apache.felix.scr

Examples of org.apache.felix.scr.Component.enable()


        Component[] components = findComponentsByName( pid );
        TestCase.assertEquals( 2, components.length );
        Component cSN = getNewComponent( known, components );

       
        cSN.enable();
        delay();
        TestCase.assertEquals( Component.STATE_ACTIVE, cSN.getState() );
        SimpleComponent scSN = SimpleComponent.INSTANCE;
        TestCase.assertEquals( pidSN, scSN.getProperty( TARGETED_PID ) );
       
View Full Code Here


        bSNV.start();
        components = findComponentsByName( pid );
        TestCase.assertEquals( 3, components.length );
        Component cSNV = getNewComponent( known, components );
       
        cSNV.enable();
        delay();
        TestCase.assertEquals( Component.STATE_ACTIVE, cSNV.getState() );
        SimpleComponent scSNV = SimpleComponent.INSTANCE;
        TestCase.assertEquals( pidSNV, scSNV.getProperty( TARGETED_PID ) );
       
View Full Code Here

        bSNVL.start();
        components = findComponentsByName( pid );
        TestCase.assertEquals( 4, components.length );
        Component cSNVL = getNewComponent( known, components );
       
        cSNVL.enable();
        delay();
        TestCase.assertEquals( Component.STATE_ACTIVE, cSNVL.getState() );
        SimpleComponent scSNVL = SimpleComponent.INSTANCE;
        TestCase.assertEquals( pidSNVL, scSNVL.getProperty( TARGETED_PID ) );
       
View Full Code Here

    {
        for ( int i = 0; i < 6; i++ )
        {
            final Component main = findComponentByName( "org.apache.felix.scr.integration.components.felix3680_2.Main" );
            TestCase.assertNotNull( main );
            main.enable();
            delay( 5 ); //run test for 30 seconds
            main.disable();
            delay(); //async deactivate
            if ( log.getFirstFrameworkThrowable() != null )
            {
View Full Code Here

        // two services with service ranking (srv6 > srv5)
        final SimpleServiceImpl srv5 = SimpleServiceImpl.create( bundleContext, "srv5", 10 );
        final SimpleServiceImpl srv6 = SimpleServiceImpl.create( bundleContext, "srv6", 20 );

        component.enable();
        delay();

        TestCase.assertEquals( Component.STATE_ACTIVE, component.getState() );
        final SimpleComponent comp30 = SimpleComponent.INSTANCE;
        TestCase.assertNotSame( comp23, comp30 );
View Full Code Here

        final SimpleServiceImpl srv1 = SimpleServiceImpl.create( bundleContext, "srv1" );
        final SimpleService2Impl srv2 = SimpleService2Impl.create( bundleContext, "srv2" );

        // async enabling
        component.enable();
        delay();

        TestCase.assertEquals( Component.STATE_ACTIVE, component.getState() );
        final SimpleComponent2 comp10 = SimpleComponent2.INSTANCE;
        TestCase.assertNotNull( comp10 );
View Full Code Here

        final Bundle bundle2 = installBundle("/integration_test_FELIX_4188_2.xml", "", "simplecomponent2");
        bundle2.start();

        final Component aComp1 =
                findComponentByName("org.apache.felix.scr.integration.components.Felix4188Component-1");
        aComp1.enable();
        final Object aInst1 = aComp1.getComponentInstance().getInstance();

        final Component aComp2 =
                findComponentByName("org.apache.felix.scr.integration.components.Felix4188Component-2");
        aComp2.enable();
View Full Code Here

        aComp1.enable();
        final Object aInst1 = aComp1.getComponentInstance().getInstance();

        final Component aComp2 =
                findComponentByName("org.apache.felix.scr.integration.components.Felix4188Component-2");
        aComp2.enable();
        final Object aInst2 = aComp2.getComponentInstance().getInstance();

        final CountDownLatch latch = new CountDownLatch(1);

        new Thread() {
View Full Code Here

        TestCase.assertFalse( component.isDefaultEnabled() );

        TestCase.assertEquals( Component.STATE_DISABLED, component.getState() );
        TestCase.assertNull( SimpleComponent.INSTANCE );

        component.enable();
        delay();

        TestCase.assertEquals( Component.STATE_UNSATISFIED, component.getState() );
        TestCase.assertNull( SimpleComponent.INSTANCE );
View Full Code Here

        TestCase.assertFalse( component.isDefaultEnabled() );

        TestCase.assertEquals( Component.STATE_DISABLED, component.getState() );
        TestCase.assertNull( SimpleComponent.INSTANCE );

        component.enable();
        delay();

        TestCase.assertEquals( Component.STATE_UNSATISFIED, component.getState() );
        TestCase.assertNull( SimpleComponent.INSTANCE );
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.