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

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


       System.out.println(factory.getComponentDescription().getDescription());

       CompositeComponentType type = new CompositeComponentType()
           .setBundleContext(context)
           .setComponentTypeName("comp2")
           .addSubService(new InstantiatedService().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.start();

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

       ComponentInstance ci = type.createInstance();

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

       ComponentInstance c = cons.createInstance();

         CompositeComponentType type = new CompositeComponentType()
           .setBundleContext(context)
           .setComponentTypeName("compExport")
           .addSubService(new InstantiatedService().setSpecification(Foo.class.getName()))
           .addService(new ExportedService().setSpecification(Foo.class.getName()));

       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.InstantiatedService

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.