Package org.apache.felix.scr

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


        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


        TestCase.assertNotSame( comp10, comp12 );
        TestCase.assertNotSame( comp11, comp12 );
        TestCase.assertEquals( srv2, comp12.m_singleRef );
        TestCase.assertTrue( comp12.m_multiRef.isEmpty() );

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

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

        // enable component with two services available, expect srv2 bind
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

        final SimpleComponent comp12 = SimpleComponent.INSTANCE;
        TestCase.assertNotSame( comp10, comp12 );
        TestCase.assertEquals( srv2, comp12.m_singleRef );
        TestCase.assertTrue( comp12.m_multiRef.isEmpty() );

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

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

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

        delay(300);

        mainCompInst = main.getComponentInstance();
        TestCase.assertNotNull(mainCompInst);

        main.disable();
        dep1Reg.unregister();
        dep2Reg.unregister();

        dep1Reg = register(new SimpleComponent(), 0);
        dep2Reg = register(new SimpleComponent2(), 1000);
View Full Code Here

                findComponentByName("org.apache.felix.scr.integration.components.felix3680.Main");
        TestCase.assertNotNull(main);
        main.enable();

        delay(30);
        main.disable();
        delay( ); //async deactivate
        for (Iterator it = log.foundWarnings().iterator(); it.hasNext();)
        {
            String message = (String) it.next();
            if (message.startsWith("Performed ") && message.endsWith(" tests."))
View Full Code Here

    }

    public void deactivateComponent(String componentName) {
        final Component component = findComponent(componentName);
        if (component != null)
            component.disable();
        else
            LOGGER.warn("No component found for name: " + componentName);
    }

    private Component findComponent(String componentName) {
View Full Code Here

     * @throws Exception
    */
    public void deactivateComponent(String componentName) throws Exception {
        final Component component = findComponent(componentName);
        if (component != null)
            component.disable();
        else
            LOGGER.warn("No component found for name: " + componentName);
    }

    private Component findComponent(String componentName) {
View Full Code Here

    }

    public void deactiveateComponent(String componentName) throws Exception {
        final Component component = findComponent(componentName);
        if(component != null)
            component.disable();
        else
            LOGGER.warn("No component found for name: " + componentName);
    }
   
    private Component findComponent(String componentName) {
View Full Code Here

     * @throws Exception
     */
    public void deactiveateComponent(String componentName) throws Exception {
        final Component component = findComponent(componentName);
        if (component != null)
            component.disable();
        else
            LOGGER.warn("No component found for name: " + componentName);
    }

    private Component findComponent(String componentName) {
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.