From the course: WebSocket Programming with Java EE

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

WebSocket functionality

WebSocket functionality

From the course: WebSocket Programming with Java EE

Start my 1-month free trial

WebSocket functionality

- [Narrator] Okay, so let's talk a little bit about a session. The session object is important because all of the interactions between a client and an endpoint are modeled with a session object. A session is created per client, when the client first connects to the endpoint and is maintained until the connection is closed. In both a pragmatic and intonation methodologies, the session is used to track the client and is the logical place to maintain a reference to the RemoteEndPoint object that is capable of sending messages to the client. An instance of the RemoteEndPoint exposes messages sending capabilities. There are three types of messages that a WebSocket endpoint can handle, text, binary and pong. And for each message type, only one handler can be registered for each session. Within one application, there can be many endpoints. Each must have a different URI mapping. The WebSocket API compares the incoming URI to the collection of endpoint URIs and determines the best match…

Contents