Clement Escoffier | dfce6b3 | 2008-07-30 18:05:29 +0000 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
| 2 | <ipojo xmlns:ev="org.apache.felix.ipojo.handlers.event.EventAdminHandler">
|
| 3 |
|
| 4 | <!-- The (asynchronous) donut provider -->
|
| 5 | <component className="org.apache.felix.ipojo.test.donut.DonutProviderImpl"
|
| 6 | name="donut-provider">
|
| 7 | <!-- Expose the donut provider service -->
|
| 8 | <provides interface="org.apache.felix.ipojo.test.donut.DonutProvider">
|
| 9 | <property name="name" field="m_name" value="Unknown donut vendor"/>
|
| 10 | </provides>
|
| 11 | <!-- Donut publisher -->
|
| 12 | <ev:publisher name="donut-publisher" field="m_publisher"
|
| 13 | topics="food/donuts" data-key="food" synchronous="false"/>
|
| 14 | </component>
|
| 15 |
|
| 16 | <!-- The synchronous donut provider -->
|
| 17 | <component className="org.apache.felix.ipojo.test.donut.DonutProviderImpl"
|
| 18 | name="synchronous-donut-provider">
|
| 19 | <!-- Expose the donut provider service -->
|
| 20 | <provides interface="org.apache.felix.ipojo.test.donut.DonutProvider">
|
| 21 | <property name="name" field="m_name" value="Unknown donut vendor"/>
|
| 22 | </provides>
|
| 23 | <!-- Donut publisher -->
|
| 24 | <ev:publisher name="donut-publisher" field="m_publisher"
|
| 25 | topics="food/donuts" data-key="food" synchronous="true"/>
|
| 26 | </component>
|
| 27 |
|
| 28 | <!-- The (asynchronous) donut event provider -->
|
| 29 | <component
|
| 30 | className="org.apache.felix.ipojo.test.donut.DonutEventProviderImpl"
|
| 31 | name="donut-event-provider">
|
| 32 | <!-- Expose the donut provider service -->
|
| 33 | <provides interface="org.apache.felix.ipojo.test.donut.DonutProvider">
|
| 34 | <property name="name" field="m_name" value="Unknown donut vendor"/>
|
| 35 | </provides>
|
| 36 | <!-- Raw events publisher -->
|
| 37 | <ev:publisher name="event-publisher" field="m_publisher"
|
| 38 | topics="food/donuts" synchronous="false"/>
|
| 39 | </component>
|
| 40 |
|
| 41 | <!-- The synchronous donut event provider -->
|
| 42 | <component
|
| 43 | className="org.apache.felix.ipojo.test.donut.DonutEventProviderImpl"
|
| 44 | name="synchronous-donut-event-provider">
|
| 45 | <!-- Expose the donut provider service -->
|
| 46 | <provides interface="org.apache.felix.ipojo.test.donut.DonutProvider">
|
| 47 | <property name="name" field="m_name" value="Unknown donut vendor"/>
|
| 48 | </provides>
|
| 49 | <!-- Raw events publisher -->
|
| 50 | <ev:publisher name="event-publisher" field="m_publisher"
|
| 51 | topics="food/donuts" synchronous="true"/>
|
| 52 | </component>
|
| 53 |
|
| 54 | <!-- The (asynchronous) event provider -->
|
| 55 | <component
|
| 56 | className="org.apache.felix.ipojo.test.donut.AsyncEventProviderImpl"
|
| 57 | name="event-provider">
|
| 58 | <!-- Expose the donut provider service -->
|
| 59 | <provides interface="org.apache.felix.ipojo.test.donut.DonutProvider">
|
| 60 | <property name="name" field="m_name" value="Unknown donut vendor"/>
|
| 61 | </provides>
|
| 62 | <!-- Direcly interacts with the Event Admin service -->
|
| 63 | <requires field="m_ea"/>
|
| 64 | </component>
|
| 65 |
|
| 66 | <!-- The synchronous event provider -->
|
| 67 | <component
|
| 68 | className="org.apache.felix.ipojo.test.donut.SyncEventProviderImpl"
|
| 69 | name="synchronous-event-provider">
|
| 70 | <!-- Expose the donut provider service -->
|
| 71 | <provides interface="org.apache.felix.ipojo.test.donut.DonutProvider">
|
| 72 | <property name="name" field="m_name" value="Unknown donut vendor"/>
|
| 73 | </provides>
|
| 74 | <!-- Direcly interacts with the Event Admin service -->
|
| 75 | <requires field="m_ea"/>
|
| 76 | </component>
|
| 77 |
|
| 78 | <!-- The donut consumer -->
|
| 79 | <component className="org.apache.felix.ipojo.test.donut.DonutConsumerImpl"
|
| 80 | name="donut-consumer">
|
| 81 | <!-- Expose the donut consumer service -->
|
| 82 | <provides interface="org.apache.felix.ipojo.test.donut.DonutConsumer">
|
| 83 | <property name="name" field="m_name" value="Unknown donut consumer"/>
|
| 84 | <property name="slow" field="m_isSlow" value="false"/>
|
| 85 | </provides>
|
| 86 | <!-- Donut events subscriber -->
|
| 87 | <ev:subscriber name="donut-subscriber" callback="receiveDonut"
|
| 88 | topics="food/donuts" data-key="food"
|
| 89 | data-type="org.apache.felix.ipojo.test.donut.Donut"/>
|
| 90 | </component>
|
| 91 |
|
| 92 | <!-- The donut event consumer -->
|
| 93 | <component className="org.apache.felix.ipojo.test.donut.DonutConsumerImpl"
|
| 94 | name="donut-event-consumer">
|
| 95 | <!-- Expose the donut consumer service -->
|
| 96 | <provides interface="org.apache.felix.ipojo.test.donut.DonutConsumer">
|
| 97 | <property name="name" field="m_name" value="Unknown donut consumer"/>
|
| 98 | <property name="slow" field="m_isSlow" value="false"/>
|
| 99 | </provides>
|
| 100 | <!-- Raw events subscriber -->
|
| 101 | <ev:subscriber name="donut-event-subscriber" callback="receiveEvent"
|
| 102 | topics="food/donuts"/>
|
| 103 | </component>
|
| 104 |
|
| 105 | <!-- The event consumer -->
|
| 106 | <component className="org.apache.felix.ipojo.test.donut.EventConsumerImpl"
|
| 107 | name="event-consumer">
|
| 108 | <!-- Expose the donut consumer service -->
|
| 109 | <provides
|
| 110 | interface="{org.apache.felix.ipojo.test.donut.DonutConsumer,org.osgi.service.event.EventHandler}">
|
| 111 | <property name="name" field="m_name" value="Unknown event consumer"/>
|
| 112 | <property name="slow" field="m_isSlow" value="false"/>
|
| 113 | <property name="event.topics" type="String" value="food/donuts"/>
|
| 114 | </provides>
|
| 115 | </component>
|
| 116 |
|
| 117 | <!-- The event tracker -->
|
| 118 | <component className="org.apache.felix.ipojo.test.donut.EventTrackerImpl"
|
| 119 | name="event-tracker">
|
| 120 | <!-- Expose the donut consumer service -->
|
| 121 | <provides
|
| 122 | interface="{org.apache.felix.ipojo.test.donut.EventTracker,org.osgi.service.event.EventHandler}">
|
| 123 | <property name="name" field="m_name" value="Unknown event tracker"/>
|
| 124 | <property name="event.topics" type="String" value="food/donuts"/>
|
| 125 | </provides>
|
| 126 | </component>
|
| 127 |
|
| 128 |
|
| 129 | <!-- Example instances -->
|
| 130 | <instance component="donut-provider" name="zeifhgbzre">
|
| 131 | <property name="name" value="zeifhgbzre donuts"/>
|
| 132 | </instance>
|
| 133 | <instance component="donut-consumer" name="zeifhgbzre simpson">
|
| 134 | <property name="name" value="zeifhgbzre simpson"/>
|
| 135 | <property name="slow" value="false"/>
|
| 136 | </instance>
|
| 137 |
|
| 138 | </ipojo> |