Reputation: 23
How can I reach the information that is available through the "ls" and "comp [id]" commands in the OSGi console programmatically so that I can log information about unsatisfied references?
Upvotes: 2
Views: 461
Reputation: 161
In Equinox org.apache.felix.scr.ScrService serves a purpose similar to the SerivceComponentRuntime mentioned above, which I couldn't find in Eclipse Mars 2.
org.apache.felix.scr.ScrService is located in org.eclipse.equinox.ds bundle.
Sample reference definition:
<reference
bind="setScrService"
cardinality="0..1"
interface="org.apache.felix.scr.ScrService"
name="ScrService"
policy="static"/>
Upvotes: 1
Reputation: 6046
You can get all information via the OSGi service that is registered with the ServiceComponentRuntime interface.
Upvotes: 3