A web implementation of the WebSocket protocol has two parts to it that work in unison. The fronend client and the back end server. The client makes the initial connection with the server and the server waits for a client connection. You can look at how the connection is initialised and how to manage life cycles. The client and the server communicate bidirectionally. You can look at how the server responds to a client connection and manage life cycles.
- [Narrator] As previously discussed,…the WebSocket connection is initiated by the client.…Which sends a HTTP upgrade request to the server.…The server responds with a 101 Switching Protocol…status code to confirm that the switching has occurred.…Then after the handshake, the client and the server…can send messages to each other at will…until either side sends a close notification…or there is a connection error.…From a coding perspective what does this look like?…Well, if the client is a browser,…we initiate the connection by simply…creating a new WebSocket and passing the URI…to the end point.…
The server application receives the request…on the specified URI and creates a session.…And this session remains open…for the duration of the connection.…Both sides create eventlessness for messages…and can start to exchange messages.…Additional listeners are set up for error and close events.…If the WebSocket client is a browser,…you need to ensure that you check that the browser…is WebSocket compatible.…In Java Scripts you can check the existence…
Join Alex Theedom as he guides you through the lifecycle of a WebSocket connection, and discusses the Java EE WebSocket programming methodologies: annotation and programmatic. He shows how to secure and encrypt WebSocket endpoints and use simple techniques to test their implementation. In addition, he explains how to integrate the JSON-processing API and build a front-end and server based WebSocket client.
- WebSocket usage
- WebSocket lifecycle and topology
- WebSocket front end and back end
- WebSocket methodologies
- Annotation methodology and programmatic methodology
- Coding a client API
- Using the JSON Processing API
- Coding the encoder and decoder
- Building the front end
- Testing WebSocket endpoints
Skill Level Intermediate
Java Platforms Compared: SE vs EE vs MEwith Peggy Fisher25m 38s Intermediate
1. Introduction to WebSocket
2. WebSockets Front End and Back End
3. Project Application and Structure
4. Java EE WebSocket API
5. Messages and Encoding
6. Build Web Front End
7. WebSocket Security
8. Testing WebSocket Endpoints
Next steps1m 37s
- 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.