Zen in the Guava Event Bus

The other day I was researching implementations of the Event Bus pattern and decided to have a look at the Guava event bus.

The page linked above is in Questions-and-Answers format, and includes the following questions:

What Event Bus problems can be detected at compile time?

[…]

What Event Bus problems can be detected immediately at registration?

[…] Any violations of this rule will cause an IllegalArgumentException to be thrown.

(This check could be moved to compile-time using APT, a solution we’re researching.)

What EventBus problems may only be detected later, at runtime?

[…]

How do I test event listeners and their handler methods?

[…]

These questions should look familiar to the readers of this blog! The first one provides Level One guarantees (it is not said explicitly but the example they provide is of a compilation error). The second question lists Level Five guarantees, with an indication that they are working on raising them to Level One or Two. The third question lists Level Six guarantees and finally the last question tells how to obtain Level Four guarantees.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" cssfile="">