You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Trần Tiến Đức (JIRA)" <se...@james.apache.org> on 2019/01/04 11:54:00 UTC

[jira] [Created] (JAMES-2640) Replace MailboxDispatcher & Delegating listener by the new event bus

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

             Summary: Replace MailboxDispatcher & Delegating listener by the new event bus
                 Key: JAMES-2640
                 URL: https://issues.apache.org/jira/browse/JAMES-2640
             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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org