As reactive programming grew in the development environment, the Java language and Java EE needed to create tools to permit developers to develop systems using reactive programming. On Java EE, some solutions were introduced that made it possible to use the style function and to create processes asynchronously. One of these solutions is Event in CDI; this solution could launch a synchronous and blocking event, or an asynchronous and nonblocking event using CDI.
In CDI, Event is a solution that Java EE built using the observer pattern, making it possible to develop and launch an event to separate components doing the processing, working as a synchronous and blocking or asynchronous and nonblocking process. This separate task is an observer that reacts to an event launched with its data. In this chapter, we will focus on asynchronous...