Yo!

On Tue, Sep 6, 2016 at 10:45 AM, Jim Chen <nc...@mozilla.com> wrote:

> Hi all,
>
> Bug 1291383 landed dispatch(Bundle) methods in EventDispatcher, which let
> you dispatch events to registered BundleEventListeners from Java, in
> addition to from JS.
>
> Note that BundleEventListeners are registered using
> registerUiThreadListener and registerBackgroundThreadListener, so you
> cannot dispatch events to listeners registered using
> registerGeckoThreadListener. Also, these events are always asynchronous,
> even if you're dispatching to the current thread, but you can provide an
> EventCallback object for callback if needed.
>

First, thanks to Jim for doing this work.  Second, I'd prefer to cast this
in the following way:

"Firefox for Android just grew a Java-side global message bus, available
throughout the App lifecycle."

This is the equivalent of the JavaScript-side Services message bus.  This
is helpful when you want to decouple parts of the App; I use it to allow us
to compile things separately, but there are many other uses.  There are
many other things well-suited to messaging in this form.

Thanks Jim!
Nick
_______________________________________________
mobile-firefox-dev mailing list
mobile-firefox-dev@mozilla.org
https://mail.mozilla.org/listinfo/mobile-firefox-dev

Reply via email to