Examples of reconfigure()


Examples of org.apache.felix.ipojo.ComponentInstance.reconfigure()

        // Another reconfiguration (that does not affect the filters)
        newProps = new Properties();
        newProps.put("instance.id", "3");
        newProps.put("stuff", "stuff");
        instance.reconfigure(newProps);

        assertTrue(instance.getState() == ComponentInstance.INVALID);
        desc = (DependencyHandlerDescription) instance.getInstanceDescription().getHandlerDescription("org.apache.felix" +
                ".ipojo:requires");
View Full Code Here

Examples of org.apache.felix.ipojo.ComponentInstance.reconfigure()

        assertEquals("(id=3)", dependency.getFilter());

        // Yet another reconfiguration, un-setting instance.id
        newProps = new Properties();
        newProps.put("stuff", "stuff");
        instance.reconfigure(newProps);

        assertTrue(instance.getState() == ComponentInstance.INVALID);
        desc = (DependencyHandlerDescription) instance.getInstanceDescription().getHandlerDescription("org.apache.felix" +
                ".ipojo:requires");
View Full Code Here

Examples of org.apache.felix.ipojo.ComponentInstance.reconfigure()

        // Finally another reconfiguration to build a fulfilled filter
        newProps = new Properties();
        newProps.put("instance.id", "1");
        newProps.put("stuff", "stuff");
        instance.reconfigure(newProps);

        assertTrue(instance.getState() == ComponentInstance.VALID);
        desc = (DependencyHandlerDescription) instance.getInstanceDescription().getHandlerDescription("org.apache.felix" +
                ".ipojo:requires");
View Full Code Here

Examples of org.apache.felix.ipojo.ComponentInstance.reconfigure()

        CheckService check = osgiHelper.getServiceObject(CheckService.class);
        assertThat(check.getProps().get("grade")).isEqualTo(0);

        Dictionary conf = new Hashtable();
        conf.put("grade", "1");
        instance.reconfigure(conf);

        assertThat(check.getProps().get("grade")).isEqualTo(1);

        conf.put("grade", "2");
        instance.reconfigure(conf);
View Full Code Here

Examples of org.apache.felix.ipojo.ComponentInstance.reconfigure()

        instance.reconfigure(conf);

        assertThat(check.getProps().get("grade")).isEqualTo(1);

        conf.put("grade", "2");
        instance.reconfigure(conf);
        assertThat(check.getProps().get("grade")).isEqualTo(2);

        conf.put("grade", "3");
        instance.reconfigure(conf);
        assertThat(check.getProps().get("grade")).isNull();
View Full Code Here

Examples of org.apache.felix.ipojo.ComponentInstance.reconfigure()

        conf.put("grade", "2");
        instance.reconfigure(conf);
        assertThat(check.getProps().get("grade")).isEqualTo(2);

        conf.put("grade", "3");
        instance.reconfigure(conf);
        assertThat(check.getProps().get("grade")).isNull();
    }


    private ComponentInstance provider(int i) {
View Full Code Here

Examples of org.apache.felix.ipojo.ComponentInstance.reconfigure()

        assertEquals("Classes[0] -2", FooService.class.getName(), str2[0].getName());

        Properties props2 = new Properties();
        props2.put("cls", new String[]{FooService.class.getName(), CheckService.class.getName()});
        try {
            ci.reconfigure(props2);
        } catch (Exception e) {
            fail(e.getMessage());
        }

        // Check the service property
View Full Code Here

Examples of org.apache.felix.ipojo.ComponentInstance.reconfigure()

       
        if (instance == null) {
            return; // The instance does not exist.
        }
       
        instance.reconfigure(properties); // re-configure the component
    }

    public String getFactoryName() {
        return m_componentMetadata.getAttribute("name"); // Mandatory attribute.
    }
View Full Code Here

Examples of org.apache.felix.ipojo.Factory.reconfigure()

        p3.put("boolean", true);
        p3.put("string", "foo");
        p3.put("strAProp", new String[]{"foo", "bar", "baz"});
        p3.put("intAProp", new int[]{1, 2, 3});
        try {
            fact.reconfigure(p3);
        } catch (Exception e) {
            fail("Unable to reconfigure the instance with : " + p3);
        }

        sr = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), "FooProvider-3");
View Full Code Here

Examples of org.apache.felix.ipojo.Factory.reconfigure()

        p3.put("boolean", true);
        p3.put("string", "foo");
        p3.put("strAProp", new String[]{"foo", "bar", "baz"});
        p3.put("intAProp", new int[]{1, 2, 3});
        try {
            fact.reconfigure(p3);
        } catch (Exception e) {
            fail("Unable to reconfigure the instance with : " + p3);
        }

        sr = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), "FooProvider-3");
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.