You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@celix.apache.org by MULDER Frank Willem <fr...@nl.thalesgroup.com> on 2011/09/09 13:43:46 UTC

tracker service customizer

Hello,

                Could you tell me something more about the following callback functions of the service tracker customizer:


o   void *addingService(void *handle, ...)

o   void addedService(...)

What is the difference between addingService and addedService? What data should the function addingService return?

Thanks: Frank Mulder




------------------------------------------------------------------------------------------------------------
Disclaimer:

If you are not the intended recipient of this email, please notify the sender and delete it. 
Any unauthorized copying, disclosure or distribution of this email or its attachment(s) is forbidden. 
Thales Nederland BV will not accept liability for any damage caused by this email or its attachment(s). 
Thales Nederland BV is seated in Hengelo and is registered at the Chamber of Commerce under number 06061578.
------------------------------------------------------------------------------------------------------------



Re: tracker service customizer

Posted by Alexander Broekhuis <a....@gmail.com>.
Hi Frank,


>                Could you tell me something more about the following
> callback functions of the service tracker customizer:
>

Might I suggest you first take a look at the javadoc [1] and osgi
specification [2] if such questions rise? Celix follows this spec as close
as possible, and if something seems to be incorrect/unclear or missing, feel
free to ask.


>
>
> o   void *addingService(void *handle, ...)
>
> o   void addedService(...)
>
> What is the difference between addingService and addedService? What data
> should the function addingService return?
>

In this case, addingService is explained in the javadoc/spec. The
addedService method is an addition made and needed by the Felix
DependencyManger. For Celix we have chosen to add this function to the
default ServiceTracker.

The addedService function is a callback that can be used to be informed if a
service has actually been added to the tracker, whereas the addingService is
a hook used during the adding. It can be used to intercept the service and
eg perform additional filtering.
For Celix the adding, modified and removed follow the default OSGi tracker.

[1]: http://www.osgi.org/javadoc/r4v43/
[2]: http://www.osgi.org/Specifications/HomePage


-- 
Met vriendelijke groet,

Alexander Broekhuis