You may want to read this thread:

http://www.mail-archive.com/osgi-dev%40mail.osgi.org/msg03660.html

BTW, I reviewed felix.scr and I think an implementation of this would be
pretty simple.

However, I think we need to do some convincing.

Sincerely,
- Ray


On Fri, Mar 27, 2015 at 7:49 AM, João Assunção <joao.assun...@exploitsys.com
> wrote:

> Hello all,
>
> First of all my apologies if this is duplicate of a previous question but
> my search in the archives was not very successful.
> I would like to know if it is possible to filter a reference by the value
> of a property of the component. Since this might not be clear, what I have
> in mind is something like this:
>
> @Component
> public class Controller {
> ...
> @Reference(optional=false, target="(gateId=${gateId})")//${gateId} is a
> placeholder for the value of a property in Controller
> public void setActuatorDevice(ActuatorDevice actuatorDevice){
> ...
>
> Both Controller and ActuatorDevice instances have a property named gateId
> that is set using ConfigAdmin. I know that is possible to use
> <referenceName>.target in ConfigAdmin to filter references but I would like
> to avoid that manual step.
> Thank you for your time.
>
> Regards,
>
> João Assunção
>
> Email: joao.assun...@exploitsys.com
> Mobile: +351 916968984
> Phone: +351 211933149
> Web: www.exploitsys.com
>
>
>
> _______________________________________________
> OSGi Developer Mail List
> osgi-dev@mail.osgi.org
> https://mail.osgi.org/mailman/listinfo/osgi-dev
>



-- 
*Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
 (@rotty3000)
Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
 (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org> (@OSGiAlliance)
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to