O'Reilly logo

Developing RESTful Services with JAX-RS 2.0, WebSockets, and JSON by Bhakti Mehta, Masoud Kalali

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

In this chapter we looked at advanced topics for WebSockets and Server-sent Events. We demonstrated with code snippets how to use encoders and decoders and how to receive different kinds of data using WebSockets. We also demonstrated a sample that showed how WebSockets will work with SSL so that when working with proxy servers, the communication is encrypted.

We also discussed best practices for implementing Server-sent Events and WebSockets. We learned how to ensure messages are not lost in Server-sent Events by associating IDs with events. We covered the Jersey Client API for Server-sent Events.

In the next chapter, we will cover more advanced topics such as JSON API in Java EE and the aspects of asynchronous programming to improve scalability ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required