Package org.apache.felix.ipojo

Examples of org.apache.felix.ipojo.Factory


   
    ComponentInstance instance, instance2;

   
    public void setUp() {
        Factory fact = Utils.getFactoryByName(getContext(), "CONFIG-BothConfigurableCheckService");
        Properties props = new Properties();
        props.put("instance.name","under-test");
        props.put("b", "1");
        props.put("s", "1");
        props.put("i", "1");
        props.put("l", "1");
        props.put("d", "1");
        props.put("f", "1");
        props.put("c", "a");
        props.put("bool", "true");
        props.put("bs", "{1,2,3}");
        props.put("ss", "{1,2,3}");
        props.put("is", "{1,2,3}");
        props.put("ls", "{1,2,3}");
        props.put("ds", "{1,2,3}");
        props.put("fs", "{1,2,3}");
        props.put("cs", "{a,b,c}");
        props.put("bools", "{true,true,true}");
        props.put("string", "foo");
        props.put("strings", "{foo, bar, baz}");
       
        try {
            instance = fact.createComponentInstance(props);
        } catch(Exception e) {
           fail("Cannot create the under-test instance : " + e.getMessage());
        }
       
        try {
            instance2 = fact.createComponentInstance(null);
        } catch(Exception e) {
           fail("Cannot create the under-test instance2 : " + e.getMessage());
        }
       
       
View Full Code Here


        fooProvider = ipojoHelper.getFactory("COMPO-FooProviderType-1");
        assertNotNull("Check fooProvider availability", fooProvider);

        Properties p = new Properties();
        p.put("instance.name", "importer");
        Factory compFact = ipojoHelper.getFactory("composite.requires.1");
        try {
            import1 = compFact.createComponentInstance(p);
        } catch (Exception e) {
            e.printStackTrace();
            fail("Cannot instantiate the component : " + e.getMessage());
        }
    }
View Full Code Here

    @Before
    public void setUp() {

        Properties p = new Properties();
        p.put("instance.name", "importer");
        Factory compFact = ipojoHelper.getFactory("composite.requires.4");
        try {
            import4 = compFact.createComponentInstance(p);
        } catch (Exception e) {
            fail("Cannot instantiate the component : " + e.getMessage());
        }

        import4.stop();
View Full Code Here

    @Before
    public void setUp() {

        Properties p = new Properties();
        p.put("instance.name", "importer");
        Factory compFact = ipojoHelper.getFactory("composite.requires.3");
        try {
            import3 = compFact.createComponentInstance(p);
        } catch (Exception e) {
            fail("Cannot instantiate the component : " + e.getMessage());
        }

        import3.stop();
View Full Code Here

    @Before
    public void setUp() {

        Properties p = new Properties();
        p.put("instance.name", "importer");
        Factory compFact = ipojoHelper.getFactory("composite.requires.2");
        try {
            import2 = compFact.createComponentInstance(p);
        } catch (Exception e) {
            fail("Cannot instantiate the component : " + e.getMessage());
        }

        import2.stop();
View Full Code Here

    @Before
    public void setUp() {

        Properties p = new Properties();
        p.put("instance.name", "importer");
        Factory compFact = ipojoHelper.getFactory("composite.requires.1");
        try {
            import1 = compFact.createComponentInstance(p);
        } catch (Exception e) {
            fail("Cannot instantiate the component : " + e.getMessage());
        }

        import1.stop();
View Full Code Here

    @Before
    public void setUp() {

        Properties p = new Properties();
        p.put("instance.name", "importer");
        Factory compFact = ipojoHelper.getFactory("composite.requires.1");
        try {
            import1 = compFact.createComponentInstance(p);
        } catch (Exception e) {
            fail("Cannot instantiate the component : " + e.getMessage());
        }

        import1.stop();
View Full Code Here

        fooProvider = ipojoHelper.getFactory("COMPO-FooProviderType-1");
        assertNotNull("Check fooProvider availability", fooProvider);

        Properties p = new Properties();
        p.put("instance.name", "importer");
        Factory compFact = ipojoHelper.getFactory("composite.requires.3");
        try {
            import3 = compFact.createComponentInstance(p);
        } catch (Exception e) {
            fail("Cannot instantiate the component : " + e.getMessage());
        }
    }
View Full Code Here

        fooProvider = ipojoHelper.getFactory("COMPO-FooProviderType-1");
        assertNotNull("Check fooProvider availability", fooProvider);

        Properties p = new Properties();
        p.put("instance.name", "importer");
        Factory compFact = ipojoHelper.getFactory("composite.requires.2");
        try {
            import2 = compFact.createComponentInstance(p);
        } catch (Exception e) {
            fail("Cannot instantiate the component : " + e.getMessage());
        }
    }
View Full Code Here

        fooProvider = ipojoHelper.getFactory("COMPO-FooProviderType-1");
        assertNotNull("Check fooProvider availability", fooProvider);

        Properties p = new Properties();
        p.put("instance.name", "importer");
        Factory compFact = ipojoHelper.getFactory("composite.requires.4");
        try {
            import2 = compFact.createComponentInstance(p);
        } catch (Exception e) {
            fail("Cannot instantiate the component : " + e.getMessage());
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.felix.ipojo.Factory

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.