Examples of createComponentInstance()


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

    Factory fact1 = Utils.getFactoryByName(getContext(), "COMPO-SimpleCheckServiceProvider");
    Properties props = new Properties();
    props.put("instance.name","client");
    ComponentInstance client = null;
    try {
      client = fact1.createComponentInstance(props, sc2);
    } catch(Exception e) { fail("Cannot instantiate the client : " + e.getMessage()); }
   
    Factory fact2 = Utils.getFactoryByName(getContext(), "COMPO-FooProviderType-1");
    Properties props2 = new Properties();
    props2.put("instance.name","provider");
View Full Code Here

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

    Factory fact2 = Utils.getFactoryByName(getContext(), "COMPO-FooProviderType-1");
    Properties props2 = new Properties();
    props2.put("instance.name","provider");
    ComponentInstance provider = null;
    try {
      provider = fact2.createComponentInstance(props2, sc2);
    } catch(Exception e) {
      fail("Cannot instantiate the provider : " + e.getMessage());
    }
   
    ServiceReference ref = sc2.getServiceReference(CheckService.class.getName());
View Full Code Here

Examples of org.apache.felix.ipojo.composite.CompositeFactory.createComponentInstance()

    public void testScopeUnvailability() {
        CompositeFactory factory2 = (CompositeFactory) Utils.getFactoryByName(getContext(), "SCOPE-badscope");
        assertNotNull("Factory", factory2);
        ComponentInstance instance2 = null;
        try {
            instance2 = factory2.createComponentInstance(null);
        } catch (Exception e) {
            fail("Fail instantiation : " + e.getMessage());
        }
        //System.out.println(instance2.getInstanceDescription().getDescription());
       
View Full Code Here

Examples of org.apache.felix.ipojo.junit4osgi.helpers.IPOJOHelper.createComponentInstance()

public class DuplicateMethod extends OSGiTestCase {
   
   
    public void testDuplicateMethod() {
        IPOJOHelper helper = new IPOJOHelper(this);
        helper.createComponentInstance("plopimpl", "plop");
        ServiceReference ref = helper.getServiceReferenceByName(Plop.class.getName(), "plop");
        assertNotNull("Check plop", ref);
        Plop plop = (Plop) getServiceObject(ref);
        Object o = plop.getPlop();
        assertEquals("Check result", "plop", o);
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.