image
CHAPTER
2
Java WebSocket Lifecycle
In this chapter, we will examine the lifecycle of the WebSocket endpoint. The WebSocket endpoint lifecycle offers the developer a framework for managing resources needed by the endpoint, as well as a framework for intercepting messages. We will look closely at the sequencing and semantics of the lifecycle events and how the Java WebSocket API provides API and annotation support for processing them. We will see how they can be applied in a sample application in both annotated and programmatic form.
The WebSocket Protocol
We’ll start with a little background on the WebSocket protocol itself. Readers need not know ...

Get Java WebSocket Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.