Package org.apache.felix.scr

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


        ActivatorComponent ac = bundleContext.getService( ref );
        TestCase.assertNotNull( ac.getSimpleService() );

        TestCase.assertEquals( Component.STATE_ACTIVE, component.getState() );

        component.disable();

        delay();
        TestCase.assertEquals( Component.STATE_DISABLED, component.getState() );
    }
View Full Code Here


        component.enable();
        delay();

        TestCase.assertEquals( Component.STATE_ACTIVE, component.getState() );

        component.disable();

        delay();
        TestCase.assertEquals( Component.STATE_DISABLED, component.getState() );
    }
View Full Code Here

        delay();

        // activate must fail
        TestCase.assertEquals( Component.STATE_UNSATISFIED, component.getState() );

        component.disable();

        delay();
        TestCase.assertEquals( Component.STATE_DISABLED, component.getState() );
    }
View Full Code Here

        component.enable();
        delay();

        TestCase.assertEquals( Component.STATE_ACTIVE, component.getState() );

        component.disable();

        delay();
        TestCase.assertEquals( Component.STATE_DISABLED, component.getState() );
    }
View Full Code Here

        component.enable();
        delay();

        TestCase.assertEquals( Component.STATE_ACTIVE, component.getState() );

        component.disable();

        delay();
        TestCase.assertEquals( Component.STATE_DISABLED, component.getState() );
    }
View Full Code Here

        delay();

        // activate has failed
        TestCase.assertEquals( Component.STATE_UNSATISFIED, component.getState() );

        component.disable();

        delay();
        TestCase.assertEquals( Component.STATE_DISABLED, component.getState() );
    }
View Full Code Here

        component.enable();
        delay();

        TestCase.assertEquals( Component.STATE_ACTIVE, component.getState() );

        component.disable();

        delay();
        TestCase.assertEquals( Component.STATE_DISABLED, component.getState() );
    }
View Full Code Here

        TestCase.assertSame( comp22, comp23 );
        TestCase.assertEquals( srv3, comp23.m_singleRef );
        TestCase.assertTrue( comp23.m_multiRef.isEmpty() );

        // "reset"
        component.disable();
        srv3.drop();
        delay();

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

        TestCase.assertNotSame( comp10, comp12 );
        TestCase.assertNotSame( comp11, comp12 );
        TestCase.assertNull( comp12.m_singleRef );
        TestCase.assertTrue( comp12.m_multiRef.contains( srv2 ) );

        component.disable();
        delay(); // async disabling

        final SimpleServiceImpl srv3 = SimpleServiceImpl.create( bundleContext, "srv3" );

        // enable component with two services available, expect both bind
View Full Code Here

        TestCase.assertFalse( comp23.m_multiRef.contains( srv2 ) );
        TestCase.assertTrue( comp23.m_multiRef.contains( srv3 ) );
        TestCase.assertFalse( comp23.m_multiRef.contains( srv4 ) );

        // "reset"
        component.disable();
        srv3.drop();
        delay();

        // two services with service ranking (srv6 > srv5)
        final SimpleServiceImpl srv5 = SimpleServiceImpl.create( bundleContext, "srv5", 10 );
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.