Class WebSocketEndpoint

java.lang.Object
net.carcdr.yhocuspocus.websocket.WebSocketEndpoint
All Implemented Interfaces:
org.eclipse.jetty.websocket.api.Session.Listener, org.eclipse.jetty.websocket.api.Session.Listener.AutoDemanding

public class WebSocketEndpoint extends Object implements org.eclipse.jetty.websocket.api.Session.Listener.AutoDemanding
WebSocket endpoint that bridges Jetty WebSocket with YHocuspocus.

This class implements the Jetty WebSocket Session.Listener interface and creates a WebSocketTransport for each incoming connection, integrating it with the YHocuspocus server.

Each WebSocket connection gets its own listener instance, allowing proper session tracking and message routing.

Responsibilities:

  • Handle WebSocket connection lifecycle (open/close/error)
  • Receive binary messages and forward to YHocuspocus
  • Create and manage WebSocketTransport instances
  • Maintain connection context
Since:
1.0.0