loading...

JAVA: Event driven coding: Event Publishers, Listeners : google guava

inspire99 profile image Ganesh Swamypillai Updated on ・1 min read

this is about one of the most common paradigms encountered by any developer.
you might encounter a scenario wherein you would ask yourself, : i have some event. when this event happens, i want listeners of that event to be notified, so that they can take necessary action.
this is an example of observer design pattern. if you browse through any major project, you would encounter set of classes / components which cannot exist without this crucial code template.
it is very easy to implement in your own way to support this behavior.
you basically need some fundamental objects (absolute coders - please forgive my below description of the primitives, just wanted to add some spice) :
To read more, check out my original post in my blog:
https://gansai.blogspot.com/2020/01/java-posting-events-and-subscribing-to.html

Posted on by:

Discussion

markdown guide