Details
-
Improvement
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
-
None
Description
Currently, a developer has to do something like:
HippoEventBus eventBus = HippoServiceRegistry.getService(HippoEventBus.class);
eventBus.register(new Object() {
@Subscribe
void onEvent(HippoEvent event)
});
I think it would be nice, since the current usage is really geared for HippoEvent, that a developer can also do:
HippoEventBus eventBus = HippoServiceRegistry.getService(HippoEventBus.class);
eventBus.register(new HippoEventListener() {
@Override
void onEvent(HippoEvent event) {
}
});
Thus, the HippoEventListener interface already contains the 'subscribe' annotation, and also the correct type, namely HippoEvent
Also, the HippoEventBus can refer to this available listener interface : This will make its usage easier for developers, while keeping the same flexibility
Attachments
Issue Links
- relates to
-
CMS-5873 Create services jar for cross-application services
- Closed