Alex Karasulu | 5ae51c5 | 2006-03-07 21:17:07 +0000 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <bundle> |
| 3 | <!-- |
| 4 | This metadata file instructs the Gravity Service Binder to |
| 5 | create one instance of "SpellCheckServiceImpl". It also |
| 6 | tells the generic activator that this instance implements the |
| 7 | "SpellCheckService" service interface and that it has an |
| 8 | aggregate dependency on "DictionaryService" services. Since |
| 9 | the service dependency on dictionary services has a lower |
| 10 | cardinality of one, the generic activator will create the instance |
| 11 | and offer its spell check service only when there is at least |
| 12 | one dictionary service available. The service dependency is |
| 13 | "dynamic", which means that dictionary service availability |
| 14 | will be monitored dynamically at runtime and it also tells the |
| 15 | generic activator which methods to call when adding and removing |
| 16 | dictionary services. |
| 17 | --> |
| 18 | <instance class="org.apache.felix.examples.spellcheckbinder.SpellCheckServiceImpl"> |
| 19 | <service interface="org.apache.felix.examples.spellcheckservice.SpellCheckService"/> |
| 20 | <requires |
| 21 | service="org.apache.felix.examples.dictionaryservice.DictionaryService" |
| 22 | filter="(Language=*)" |
| 23 | cardinality="1..n" |
| 24 | policy="dynamic" |
| 25 | bind-method="addDictionary" |
| 26 | unbind-method="removeDictionary" |
| 27 | /> |
| 28 | </instance> |
| 29 | </bundle> |
| 30 | |
| 31 | |