public interface HostComponentProvider
OsgiPluginFactory use
this interface to retrieve a list of host components to register into the OSGi service registry.
Here is an example implementation that registers two host components:
public class MyHostComponentProvider implements HostComponentProvider {
public void provide(ComponentRegistrar registrar) {
registrar.register(SomeInterface.class).forInstance(someInstance).withName("some-bean");
registrar.register(InterfaceA.class, InterfaceB.class)
.forInstance(MyBean.class)
.withProperty("propertyA", "valueA")
.withProperty("propertyB", "valueB");
}
}
| Modifier and Type | Method and Description |
|---|---|
void |
provide(ComponentRegistrar registrar)
Gives the object a chance to register its host components with the registrar
|
void provide(ComponentRegistrar registrar)
registrar - The host component registrarCopyright © 2019 Atlassian. All rights reserved.