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

Examples of org.apache.felix.scr.integration.components.ActivatorComponent


    {
        final String componentname = "ActivatorComponent.activate.with.bind";

        ComponentConfigurationDTO cc = getDisabledConfigurationAndEnable(componentname, ComponentConfigurationDTO.ACTIVE);

        ActivatorComponent ac = ActivatorComponent.getInstance();
        TestCase.assertNotNull( ac.getSimpleService() );
       
        disableAndCheck( cc );
       
        TestCase.assertNull( ac.getSimpleService() );
    }
View Full Code Here


       
        TestCase.assertNull(bundleContext.getServiceReference( ActivatorComponent.class ));
        ss = SimpleServiceImpl.create( bundleContext, "foo" );
        ref = bundleContext.getServiceReference( ActivatorComponent.class );
        ActivatorComponent ac = bundleContext.getService( ref );
        TestCase.assertNotNull( ac.getSimpleService() );

        findComponentConfigurationByName(componentname, ComponentConfigurationDTO.ACTIVE);


        disableAndCheck( cc );
View Full Code Here

        component.enable();
        delay();

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

        ActivatorComponent ac = (ActivatorComponent) component.getComponentInstance().getInstance();
        TestCase.assertNotNull( ac.getSimpleService() );

        component.disable();

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

        delay();

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

        ServiceReference<ActivatorComponent> ref = bundleContext.getServiceReference( ActivatorComponent.class );
        ActivatorComponent ac = bundleContext.getService( ref );
        TestCase.assertNotNull( ac.getSimpleService() );

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

        component.disable();
View Full Code Here

        delay();

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

        ServiceReference<ActivatorComponent> ref = bundleContext.getServiceReference( ActivatorComponent.class );
        ActivatorComponent ac = bundleContext.getService( ref );
        TestCase.assertNotNull( ac.getSimpleService() );

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

        component.disable();
View Full Code Here

        TestCase.assertEquals( Component.STATE_UNSATISFIED, component.getState() );
       
        TestCase.assertNull(bundleContext.getServiceReference( ActivatorComponent.class ));
        ss = SimpleServiceImpl.create( bundleContext, "foo" );
        ref = bundleContext.getServiceReference( ActivatorComponent.class );
        ActivatorComponent ac = bundleContext.getService( ref );
        TestCase.assertNotNull( ac.getSimpleService() );

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

        component.disable();
View Full Code Here

TOP

Related Classes of org.apache.felix.scr.integration.components.ActivatorComponent

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.