Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-2639

Replace MailboxDispatcher & Delegating listener by the new event bus



    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: mailbox
    • Labels:


      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


      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.




            • Assignee:
              trantienduchn Trần Tiến Đức
            • Votes:
              0 Vote for this issue
              1 Start watching this issue


              • Created: