| <?xml version="1.0" encoding="UTF-8"?> |
| <component name="spellcheckscr"> |
| |
| <!-- xmlns="http://www.osgi.org/xmlns/scr/v1.0.0" --> |
| <!-- |
| This metadata file instructs the Apache Felix Service Component |
| Runtime to create one instance of "SpellCheckServiceImpl". It also |
| tells the generic activator that this instance implements the |
| "SpellCheckService" service interface and that it has an |
| aggregate dependency on "DictionaryService" services. Since |
| the service dependency on dictionary services has a lower |
| cardinality of one, the generic activator will create the instance |
| and offer its spell check service only when there is at least |
| one dictionary service available. The service dependency is |
| "dynamic", which means that dictionary service availability |
| will be monitored dynamically at runtime and it also tells the |
| generic activator which methods to call when adding and removing |
| dictionary services. |
| --> |
| <implementation class="org.apache.felix.examples.spellcheckscr.SpellCheckServiceImpl"/> |
| |
| <property name="category" value="demo" type="String"/> |
| |
| <properties entry="OSGI-INF/component.properties"/> |
| |
| <service> |
| <provide interface="org.apache.felix.examples.spellcheckservice.SpellCheckService"/> |
| </service> |
| |
| <reference name="DICTONARY" |
| interface="org.apache.felix.examples.dictionaryservice.DictionaryService" |
| filter="(Language=*)" |
| cardinality="1..n" |
| policy="dynamic" |
| bind="addDictionary" |
| unbind="removeDictionary" |
| /> |
| </component> |