You could do this by using a component factory. You would need another component to get the ComponentFactory service and call ComponentFactory.newInstance with the desired endpoint.framework.uuid service property.
But this is probably overkill for a single service. For a single service, you can use the life cycle methods of a component (activate/deactivate) to manually register/unregister the desired service.
--BJ HargraveSenior Technical Staff Member, IBM // office: +1 386 848 1781OSGi Fellow and CTO of the OSGi Alliance // mobile: +1 386 848 3788hargr...@us.ibm.com
- Original message -From: Christian Schneider via osgi-dev Sent by: osgi-dev-boun...@mail.osgi.orgTo: OSGi Developer Mail List Cc:Subject: [osgi-dev] Can a DS component control its service properties programmatically?Date: Tue, Feb 13, 2018 6:11 AM
I would like to create a component that is an remote service admin EndpointEventListener.
So it needs a property endpoint.listener.scope with a filter string.
The problem now is that I want this scope to only include endpoints from the local framework. So I need something like:
(endpoint.framework.uuid=)
So I think I can not do this using the @Component annotation. Can I set this property in the @Activate method somehow?
Christian
--
--Christian Schneiderhttp://www.liquid-reality.de
Computer Scientist
http://www.adobe.com
___OSGi Developer Mail Listosgi-dev@mail.osgi.orghttps://urldefense.proofpoint.com/v2/url?u=https-3A__mail.osgi.org_mailman_listinfo_osgi-2Ddev=DwICAg=jf_iaSHvJObTbx-siA1ZOg=p-HkGsKTJWWSiO-pz0kKXl8ALzmlqvUGeFfgHUZX8ms=KNdsR2O_JTMoIJPv3z_zAhrlxA4U8gi-QU86NbLSw1M=od1CGLzcq5KZkSVHMLAtn19Hsz53S5UV2g0HzkUrgRY=
___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev