felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clement Escoffier <clement.escoff...@gmail.com>
Subject Re: Using service interceptors to inject proxies
Date Thu, 06 Oct 2016 10:32:13 GMT

The service binding interceptor requires to have a “service” available. You should be
able to do what you want by either:

- combining a “default-implementation” strategy and a binding interceptor (it would require
to have the dependency marked as optional)
- or create your own handler that inject what you want to inject (http://felix.apache.org/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-devguide/how-to-write-your-own-handler.html


> On 6 oct. 2016, at 04:02, Martin Nielsen <mnybon@gmail.com> wrote:
> Hello everyone
> I am looking at the felix servicebinding interceptors with a certain amount
> of enthusiasm, but i am having trouble figuring out if they can solve a
> specific task.
> http://felix.apache.org/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/ipojo-advanced-topics/service-binding-interceptors.html
> What i would like to do is the following: Whenever a ServiceReference is
> requested for an interface (No matter which one), i want an interceptor to
> examine it. If the interface meets some criteria, the an interceptor should
> create a proxy for that interface, regardless of a matching implementation
> being registered.
> So: Even if no object is actually registered as a service to that
> interface, i want the interceptor to return a proxy anyway. Is that
> possible to do in any way?
> Thank you in advance.
> -Martin

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message