From the course: Java EE 8 Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Reactive features

Reactive features - Java EE Tutorial

From the course: Java EE 8 Essential Training

Start my 1-month free trial

Reactive features

- [Instructor] In Java EE 8, the JAX-RS client receives support for the Reactive programming style which provides developers with a more succinct way of handling asynchronous calls. Under the Reactive approach, we avoid the use of callbacks instead opting to use a completion stage that allows a chain of stages to be completed asynchronously. Let's take a look at using the Reactive programming style by working with the JAX-RS Reactive client. So we won't need to change anything within our resource. We're going to call the asynchronous resource method that we created previously but if we take a look at our InventoryService, you'll notice that we added a new method, the reactiveGetQuantityMethod and it returns an object of type completion stage which is generically typed to specify the InventoryItem as the generic parameter. The completion stage allows us to chain different calls together asynchronously. If you take a…

Contents