The Java EE API for WebSocket is specified in JSR 356 and has a rich list of features including two different programming models, life-cycle events, message encoders and decoders, server and client endpoints, security and much more than can be crammed into one course. In this video you will get an overview of the two programming methodologies: annotation and programmatic.
- [Instructor] The Java EE API for WebSocket…is specified in JSR 356 and has a rich set of features.…The WebSocket API provides two methodologies…for implementing WebSocket endpoints.…Programmatically, by extending the endpoint class…and overriding its lifecycle methods.…And by decorating in class with the appropriate annotations.…The programmatic method represents an endpoint…by instances of the endpoint class.…The OnOpen method is overwritten…and message handling logic is written.…Two other lifecycle methods can be overwritten,…onError and OnClose.…
And all the endpoints are registered…and URI is defined in an application configuration class.…And messages are sent…by calling a send method on the client session.…The annotation methodology is arguably much simpler,…as all WebSocket configuration happens in the same class…and is done by passing metadata…to the appropriate annotation.…So you annotate a class ServerEndpoint…and specify the endpoint's URI.…Optionally, you can specify a part parameter,…just as you might do with a REST endpoint.…
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?
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.