Trần Tiến Đức created JAMES-2641:
------------------------------------

             Summary: Replace MailboxDispatcher & Delegating listener by the 
new event bus
                 Key: JAMES-2641
                 URL: https://issues.apache.org/jira/browse/JAMES-2641
             Project: James Server
          Issue Type: Improvement
            Reporter: Trần Tiến Đức


You will make James use APIs defined in new EventBus instead than the previous 
one.

You will remove:
 - `MailboxListenerSupport API`
 - `MailboxEventDispatcher` class
 - `DelegatingMailboxListener` & sub classes

Rather than calling Mailbox Support, call the EventBus

Note that:
 - EventBus initialization should never be done in the MailboxManager (a ready 
to use EventBus should be passed to it).

This can be done in 2 steps:
 - Keeping the MailboxManager as a proxy
 - Then in a second PR directly calling the EventBus

**edited**

improvement: `MailboxEventDisplatcher` exposes some convenience methods for 
easily creating events. We need, as part of `EventFactory` to propose builders 
for Mailbox events.

Note that as part of this effort, we need to get rid of the 
MailboxEventDispatcher whose last responsibility is "not firing noop events". 
We need to move the `isNoop()` method to the Event API in order to be able to 
filter our noop event without having knowledge of the event details. Filtering 
noop should then be a responsibility of the EventBus (and as a temporary step 
of the DelegatingMailboxListener). In order to filter noop in an agnostic way, 
we need to add a `isnoop()` method in the event bus.

Once these 2 preliminary steps are done we can:
 - Remove the `MailboxEventDispatcher` (event emition can then directly be done 
on top of the delegatingListener/EventBus=
 - Replace the DelegatingListener by the EventBus.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to