Details
Description
The BroadcastModule currently used listeners annotated with @Persisted AND @Subscribe and registered on the HippoEventBus.
This however is less optimal because the default HippoEventBus implementation (GuavaHippoEventBus) explicitly needs to deal with such listeners to separated them from only @Subscribe annotated listeners.
Furthermore, in the BroadcastModule itself the whole annotation scanning has to be done again for the same reason, while effectively the HippoEventBus isn't even used to deliver the events (for this case).
To simplify both the HippoEventBus and the BroadcastModule it is easier to introduce a dedicated PersistedWorkflowEventListener interface and a whiteboard PersistedWorkflowEventService to wire these listeners to the BroadcastModule.
This has a slight upgrade consequence for existing implementations of this module, but very minimally so.
Furthermore, by introducing this dedicated interface, more listener configuration features can now easily be introduced, like for example a "boolean onlyNewEvents()" setting, which can inform the BroadcastModule that the listener should only get events delivered which were persisted after the first time registration of that listener.
I'll also add a "String getChannelName()" method through which the listener can 'subscribe' to a specific named channel, comparable to the "name" property of the @Persisted annotation.
The @Persisted annotation itself will no longer be used (and be marked as deprecated).