Find Hook Service #622
Labels
component/framework
Categorizes an issue or PR relevant to the framework.
kind/feature
Categorizes issue or PR as related to a new feature.
Find Hook Service
Add support for the "Find Hook" service, enabling the filtering of services for users when necessary.
Background
Snippet Service Hook Service Specification of the OSGi 8 spec:
Background Find Hook
Implementations hints
The specification notes that find hook callbacks are invoked when
getServiceReference
,getServiceReferences
, orgetAllServiceReferences
are executed. For Apache Celix, this translate that all theuseService
calls, along with the outcomes of thetrackServices
calls should lead to find hook callback invocations.The Java FindHook interface is as follows:
The java FindHook interface is:
Since, in Apache Celix, the service reference isn't a public API, an alternative to the references (inout) parameter must be used. Perhaps, in place of a Collection, a celix_array_t containing const celix_properties_t* entries might be suitable. Filtering out properties would then cause the corresponding service to be filtered out.
The text was updated successfully, but these errors were encountered: