Package org.apache.felix.ipojo

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


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


    bar1Factory = (ComponentFactory) Utils.getFactoryByName(getContext(), "composite.bar.1");
    Factory fact = Utils.getFactoryByName(getContext(), "composite.empty");
    Properties props = new Properties();
    props.put("instance.name","empty-X");
    try {
      empty = fact.createComponentInstance(props);
    } catch(Exception e) {
      fail("Cannot create the empty composite : " + e.getMessage());
    }
  }
 
View Full Code Here

    bar2Factory = (ComponentFactory) Utils.getFactoryByName(getContext(), "composite.bar.2");
    Factory fact = Utils.getFactoryByName(getContext(), "composite.empty");
    Properties props = new Properties();
    props.put("instance.name","empty");
    try {
      empty = fact.createComponentInstance(props);
    } catch(Exception e) {
      fail("Cannot create the empty composite : " + e.getMessage());
    }
  }
 
View Full Code Here

  public void setUp() {
    Properties p = new Properties();
    p.put("instance.name","importer");
    Factory compFact = Utils.getFactoryByName(getContext(), "composite.requires.5");
    try {
      import1 = compFact.createComponentInstance(p);
    } catch(Exception e) {
      fail("Cannot instantiate the component : " + e.getMessage());
    }
    import1.stop();
   
View Full Code Here

    bar1Factory = (ComponentFactory) Utils.getFactoryByName(getContext(), "composite.bar.3");
    Factory fact = Utils.getFactoryByName(getContext(), "composite.empty");
    Properties props = new Properties();
    props.put("instance.name","empty");
    try {
      empty = fact.createComponentInstance(props);
    } catch(Exception e) {
      fail("Cannot create the empty composite : " + e.getMessage());
    }
  }
 
View Full Code Here

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

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

        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());
        }
       
        Properties props2 = new Properties();
View Full Code Here

        props2.put("bools", new boolean[] {true,true,true});
        props2.put("string", "foo");
        props2.put("strings", new String[] {"foo", "bar", "baz"});
       
        try {
            instance2 = fact.createComponentInstance(props2);
        } catch(Exception e) {
           e.printStackTrace();
           fail("Cannot create the under-test instance 2 : " + e.getMessage());
        }
       
View Full Code Here

           e.printStackTrace();
           fail("Cannot create the under-test instance 2 : " + e.getMessage());
        }
       
        try {
            instance3 = fact.createComponentInstance(null);
        } catch(Exception e) {
           e.printStackTrace();
           fail("Cannot create the under-test instance 3 : " + e.getMessage());
        }
       
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.