I don't think it is mainly for internal stuff. For example openHAB project makes rather intense use of event admin masked under org.openhab.core.events.EventPublisher and org.openhab.core.events.EventSubscriber interfaces. Main point for above abstraction is separation of application specific logic from OSGi specification. Making it in such a way allows to mock necessary eventing logic in unit tests without real event admin (even if contract is small).
Best regards, Łukasz On 18.05.2020 02:53, Davi Baldin Tavares wrote: > Hi all, > > I would like to add an event driven communication to my app. For example if > some sort of data (pattern) is going to be saved into database by the DAO > service, an event should be raised and broadcasted to other > bundle/services/listeners. Instead of writing my own “AMQP” framework, can I > reuse current Karaf EventAdmin implementation? Event propagation is only > required inside the same instance and the outside Comunication is not > necessary right now. It is ok to extend the EventAdmin usage beyond bundle > lifecycle and framework stuff? > > Thanks, > > Davi >
