| <?xml version="1.0" encoding="UTF-8"?> |
| <bundle> |
| <!-- |
| This metadata file instructs the Apache Felix Service Binder 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. |
| --> |
| <instance class="org.apache.felix.examples.spellcheckbinder.SpellCheckServiceImpl"> |
| <service interface="org.apache.felix.examples.spellcheckservice.SpellCheckService"/> |
| <requires |
| service="org.apache.felix.examples.dictionaryservice.DictionaryService" |
| filter="(Language=*)" |
| cardinality="1..n" |
| policy="dynamic" |
| bind-method="addDictionary" |
| unbind-method="removeDictionary" |
| /> |
| </instance> |
| </bundle> |
| |
| |