You have the information you needed from an external API. How can you respond to the client with the information they need?
- [Instructor] Hi, welcome to the fourth video…of this section: Responding Back to the Client.…In the previous video, we processed request…for a client and we communicated with an external API…to get information about trades using RxJava.…In this video, we are going to complete the end points…to send information back to the client.…We will see how to subscribe to the publishers…and do some error handling with mappers and exceptions.…Before going to the code,…let's see how we can handle errors in Jersey.…
If we want to reply to the client with a specific…http error instead of a response with data,…we can use custom exceptions and mappers…that comes as part of JAX-RS.…A mapper extends from exception mapper,…and it implements the method to respond…which triggers a response with the status we want…and the message we desire.…Usually we have one mapper per exception,…a one-to-one relationship.…Let's see that in code.…
I am using start as before error handling,…and I created two kind of exceptions,…internal level exception and currency not found exceptions.…
AuthorManuel Vicente Vivo
This course was created and produced by Packt Publishing. We are honored to host this training in our library.
- What is reactive programming?
- Java 9 reactive features
- Creating and observing sources with RxJava
- Unit testing
- Akka streams in a reactive environment
- Building a sample reactive application
Skill Level Intermediate
1. What Is Reactive Programming?
2. Reactivity in Java 9
3. Introducing RxJava 2.0
5. Concurrency and Unit Testing
6. Akka Streams
7. Real-Life Reactive Application
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.