Skip to main content



      Home
Home » Eclipse Projects » e(fx)clipse » Clean way of being notified of new OSGi Services?
Clean way of being notified of new OSGi Services? [message #1794529] Fri, 31 August 2018 18:07 Go to next message
Eclipse UserFriend
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!
Re: Clean way of being notified of new OSGi Services? [message #1794530 is a reply to message #1794529] Fri, 31 August 2018 19:35 Go to previous messageGo to next message
Eclipse UserFriend
Sure it can be applied to a method but there the @Service needs to be put on the argument
Re: Clean way of being notified of new OSGi Services? [message #1794605 is a reply to message #1794530] Mon, 03 September 2018 12:27 Go to previous message
Eclipse UserFriend
Thank you Tom.
Previous Topic:How can I customize how default elements are rendered?
Next Topic:Cannot use "Generate Javafx getter and setters"
Goto Forum:
  


Current Time: Sun May 11 23:37:08 EDT 2025

Powered by FUDForum. Page generated in 0.04302 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top