Examples of ComponentConfigurationDTO


Examples of org.osgi.service.component.runtime.dto.ComponentConfigurationDTO

        bundle1.start();

        final Bundle bundle2 = installBundle("/integration_test_FELIX_4188_2.xml", "org.apache.felix.scr.integration.components", "simplecomponent2");
        bundle2.start();

        final ComponentConfigurationDTO aComp1 =
                findComponentConfigurationByName( bundle1, "org.apache.felix.scr.integration.components.Felix4188Component-1", ComponentConfigurationDTO.SATISFIED);
        final Object aInst1 = getServiceFromConfiguration(aComp1, Felix4188Component.class);

        final ComponentConfigurationDTO aComp2 =
                findComponentConfigurationByName( bundle2, "org.apache.felix.scr.integration.components.Felix4188Component-2", ComponentConfigurationDTO.SATISFIED);
        final Object aInst2 = getServiceFromConfiguration(aComp2, Felix4188Component.class);

        final CountDownLatch latch = new CountDownLatch(1);
View Full Code Here

Examples of org.osgi.service.component.runtime.dto.ComponentConfigurationDTO

   
    @Test
    public void testAnnoConfig() throws Exception
    {
        String name = "org.apache.felix.scr.integration.components.annoconfig";
        ComponentConfigurationDTO dto = findComponentConfigurationByName(name, ComponentConfigurationDTO.SATISFIED);
        AnnoComponent ac = getServiceFromConfiguration(dto, AnnoComponent.class);
        checkA1NoValues(ac.m_a1_activate);
        checkA1ArraysNoValues(ac.m_a1Arrays_activate);
       
        Configuration c = configure(name, null, allValues());
View Full Code Here

Examples of org.osgi.service.component.runtime.dto.ComponentConfigurationDTO

        delay();
       
        //Add more and more specific components to check that they pick up the appropriate configuration
        Set<ComponentConfigurationDTO> known = new HashSet<ComponentConfigurationDTO>();
       
        final ComponentConfigurationDTO component = findComponentConfigurationByName( COMPONENT_NAME, ComponentConfigurationDTO.ACTIVE );
        known.add( component );

        TestCase.assertNotNull( SimpleComponent.INSTANCE );
        SimpleComponent sc = SimpleComponent.INSTANCE;
        TestCase.assertEquals( pid, sc.getProperty( TARGETED_PID ) );
View Full Code Here

Examples of org.osgi.service.component.runtime.dto.ComponentConfigurationDTO

    @Test
    public void test_concurrent_component_activation_using_componentFactories() throws Exception
    {


      ComponentConfigurationDTO ccA = getDisabledConfigurationAndEnable( "org.apache.felix.scr.integration.components.concurrency.AFactory", ComponentConfigurationDTO.ACTIVE );
      ComponentConfigurationDTO ccC = getDisabledConfigurationAndEnable( "org.apache.felix.scr.integration.components.concurrency.CFactory", ComponentConfigurationDTO.ACTIVE );

        delay( 30 );
        if ( ! log.foundWarnings().isEmpty() )
        {
            TestCase.fail( "unexpected warning or error logged: " + log.foundWarnings() );
View Full Code Here

Examples of org.osgi.service.component.runtime.dto.ComponentConfigurationDTO

     */
    @Test
    public void test_A11_B11()
    {
        String componentNameA = "1.A.1.1.dynamic";
        final ComponentConfigurationDTO componentA = findComponentConfigurationByName( componentNameA, ComponentConfigurationDTO.UNSATISFIED_REFERENCE );

        String componentNameB = "1.B.1.1.dynamic";
        final ComponentConfigurationDTO componentB = findComponentConfigurationByName( componentNameB, ComponentConfigurationDTO.UNSATISFIED_REFERENCE );
    }
View Full Code Here

Examples of org.osgi.service.component.runtime.dto.ComponentConfigurationDTO

     */
    @Test
    public void test_A11_B0n_immediate_A_first() throws InvalidSyntaxException
    {
        String componentNameA = "2.A.1.1.dynamic";
        final ComponentConfigurationDTO componentA = findComponentConfigurationByName( componentNameA, ComponentConfigurationDTO.ACTIVE );
        A a = getServiceFromConfiguration(componentA, A.class);
        assertEquals( 1, a.getBs().size());

        String componentNameB = "2.B.0.n.dynamic";
        final ComponentConfigurationDTO componentB = findComponentConfigurationByName( componentNameB, ComponentConfigurationDTO.ACTIVE );
        B b = getServiceFromConfiguration(componentB, B.class);
        assertEquals( 1, b.getAs().size() );
    }
View Full Code Here

Examples of org.osgi.service.component.runtime.dto.ComponentConfigurationDTO

     */
    @Test
    public void test_A11_B0n_immediate_B_first() throws InvalidSyntaxException
    {
        String componentNameA = "3.A.1.1.dynamic";
        final ComponentConfigurationDTO componentA = findComponentConfigurationByName( componentNameA, ComponentConfigurationDTO.ACTIVE );
        A a = getServiceFromConfiguration(componentA, A.class);
        assertEquals( 1, a.getBs().size());

        String componentNameB = "3.B.0.n.dynamic";
        final ComponentConfigurationDTO componentB = findComponentConfigurationByName( componentNameB, ComponentConfigurationDTO.ACTIVE );
        B b = getServiceFromConfiguration(componentB, B.class);
        assertEquals( 1, b.getAs().size() );
    }
View Full Code Here

Examples of org.osgi.service.component.runtime.dto.ComponentConfigurationDTO

     */
    @Test
    public void test_A11_B0n_delayed_A_first() throws InvalidSyntaxException
    {
        String componentNameA = "4.A.1.1.dynamic";
        final ComponentConfigurationDTO componentA = findComponentConfigurationByName( componentNameA, ComponentConfigurationDTO.SATISFIED );

        String componentNameB = "4.B.0.n.dynamic";
        final ComponentConfigurationDTO componentB = findComponentConfigurationByName( componentNameB, ComponentConfigurationDTO.SATISFIED );

        delay();

        A a = getServiceFromConfiguration(componentA, A.class);
        assertEquals( 1, a.getBs().size());
View Full Code Here

Examples of org.osgi.service.component.runtime.dto.ComponentConfigurationDTO

     */
    @Test
    public void test_A11_B0n_delayed_B_first() throws Exception
    {
        String componentNameA = "4.A.1.1.dynamic";
        ComponentConfigurationDTO componentA = findComponentConfigurationByName( componentNameA, ComponentConfigurationDTO.SATISFIED );

        String componentNameB = "4.B.0.n.dynamic";
        final ComponentConfigurationDTO componentB = findComponentConfigurationByName( componentNameB, ComponentConfigurationDTO.SATISFIED);

        ServiceReference[] serviceReferencesB = bundleContext.getServiceReferences( B.class.getName(), "(service.pid=" + componentNameB + ")" );
        TestCase.assertEquals( 1, serviceReferencesB.length );
        ServiceReference serviceReferenceB = serviceReferencesB[0];
        Object serviceB = bundleContext.getService( serviceReferenceB );
View Full Code Here

Examples of org.osgi.service.component.runtime.dto.ComponentConfigurationDTO

     */
    @Test
    public void test_A11_B01_immediate_A_first() throws InvalidSyntaxException
    {
        String componentNameA = "5.A.1.1.dynamic";
        final ComponentConfigurationDTO componentA = findComponentConfigurationByName( componentNameA, ComponentConfigurationDTO.ACTIVE );
        A a = getServiceFromConfiguration(componentA, A.class);
        assertEquals( 1, a.getBs().size());

        String componentNameB = "5.B.0.1.dynamic";
        final ComponentConfigurationDTO componentB = findComponentConfigurationByName( componentNameB, ComponentConfigurationDTO.ACTIVE );
        B b = getServiceFromConfiguration(componentB, B.class);
        assertEquals( 1, b.getAs().size() );
    }
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.