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: [email protected]
Mobile: +351 916968984
Phone: +351 211933149
Web: www.exploitsys.com
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to