Class SocketEndpointHandler.SocketEndpointWrapper

java.lang.Object
io.fluxcapacitor.javaclient.web.SocketEndpointHandler.SocketEndpointWrapper
Enclosing class:
SocketEndpointHandler

@Path("*") public static class SocketEndpointHandler.SocketEndpointWrapper extends Object
A stateful wrapper around a WebSocket endpoint instance, managing per-session behavior and message handling.

This class is created per WebSocket session and holds:

  • A lazily instantiated target handler
  • Connection health tracking (ping/pong logic)
  • Automatic session cleanup via Registration hooks
  • Delegation to matching methods for open, message, pong, and close events

When the first @HandleSocketOpen or @HandleSocketMessage message arrives for a session, the target handler is initialized and stored. Subsequent WebSocket lifecycle messages (e.g. @HandleSocketPong, @HandleSocketClose) are routed to the correct methods on the same instance.

Ping scheduling and timeout behavior is based on the SocketEndpoint.aliveCheck() configuration.

See Also: