Jakarta RESTful Web Services also has some great features for event-driven programming. This recipe shows you how you can use an asynchronous invoker from the request to write responses through callbacks.
Building reactive applications using Jakarta RESTful Web Services
Getting ready
Let's first add our Jakarta EE 8 dependency:
<dependency<
<groupId<javax</groupId<
<artifactId<javaee-api</artifactId<
<version<8.0</version<
<scope<provided</scope<
</dependency<