On May 26, 2017 11:18 AM, "Mark Raynsford" <[email protected]> wrote:
On 2017-05-26T14:23:43 +0200 Peter Kriens <[email protected]> wrote: > When you get a request you get the calling bundle. Through the bundle > you can find out to what bundles it is wired to in the given > namespace. Can you explain a little more about this? I don't see anything in the Bundle interface, is there some specific API for accessing wiring? It's not quite in the Bundle interface, but it's nearby, thanks to the Bundle::adapt method [1]. The class you need to adapt to is org.osgi.framework.BundleWiring [2] BundleWiring wiring = bundle.adapt(BundleWiring.class); You can then get a listing of resources visible to the bundle class loader, and obtain the appropriate URLs. Simon [1] https://osgi.org/javadoc/r6/core/org/osgi/framework/Bundle.html#adapt(java.lang.Class) [2] https://osgi.org/javadoc/r6/core/org/osgi/framework/wiring/BundleWiring.html
_______________________________________________ OSGi Developer Mail List [email protected] https://mail.osgi.org/mailman/listinfo/osgi-dev
