Package org.apache.felix.ipojo.api.composite

Examples of org.apache.felix.ipojo.api.composite.ImportedService


       assertThat(refs.length, is(not(0)));

       CompositeComponentType type = new CompositeComponentType()
           .setBundleContext(context)
           .setComponentTypeName("comp2")
           .addSubService(new ImportedService().setSpecification(Foo.class.getName()))
           .addInstance(new Instance(cons.getFactory().getName()));

       ComponentInstance ci = type.createInstance();

       System.out.println(ci.getInstanceDescription().getDescription());
View Full Code Here


       prov.createInstance();

       CompositeComponentType type = new CompositeComponentType()
           .setBundleContext(context)
           .setComponentTypeName("comp3")
           .addSubService(new ImportedService().setSpecification(Foo.class.getName()).setOptional(true));

       ComponentInstance ci = type.createInstance();

       assertThat("ci is valid", ci.getState(), is(ComponentInstance.VALID));
View Full Code Here

TOP

Related Classes of org.apache.felix.ipojo.api.composite.ImportedService

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.