In Part 1, we discussed some basic Socket programming interview questions. In Part 2 we discussed some basics of WebSockets. In Part 3 we will learn about the Java API for WebSocket (JSR 356), the key components of the Java WebSocket API, and how to handle WebSocket events in Java.
The Java API for WebSocket, specified by JSR 356, supports creating WebSocket applications in Java and is defined in the javax.websocket package. It provides a set of classes and interfaces that allow us to create WebSocket-based applications in Java. The WebSocket API was introduced in Java EE 7 and is designed to simplify the development of real-time, bidirectional communication between clients and servers.