Clean way of being notified of new OSGi Services? [message #1794529] |
Fri, 31 August 2018 18:07  |
Eclipse User |
|
|
|
Hi all,
I would like know if there is a clean way to be notified of new OSGi services available.
I know that with @Inject + @Service can be used for the injection of the highest service implementation (applied to a single field) or all the implementations if applied to a list.
@Service makes the code really clean and has the advantage of keeping the references updated, but unfortunately cannot be applied to a method (like @Inject) to react when a new service implementation is available.
Is there a clean e(fx)clipe way to do this or should I just add a ServiceListener to the BundleContext in an Activator?
Thanks!
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04302 seconds