Class WebsocketRouteHandler<R extends RequestContext<?>,W extends WebsocketContext<?>>

All Implemented Interfaces:

public class WebsocketRouteHandler<R extends RequestContext<?>,W extends WebsocketContext<?>> extends Object implements Handler<R>
Route handler that manages the upgrade from a HTTP request to a WebSocket connection, once the potential "before" filters have been ran.
  • Field Details

    • logger

      protected static final org.slf4j.Logger logger
  • Constructor Details

  • Method Details

    • getWebsocketRoute

      protected WebsocketRoute<R,W> getWebsocketRoute()
    • getServer

      protected Server getServer()
    • getServerEndpointHandlers

      protected Map<String,WebsocketEndpointHandler> getServerEndpointHandlers()
    • getWebsocketServerEndpointHandlerFactory

      protected WebsocketEndpointHandlerFactory<R,W> getWebsocketServerEndpointHandlerFactory()
    • getWebsocketEndpointToControllerManager

      protected WebsocketEndpointToControllerManager getWebsocketEndpointToControllerManager()
    • getEndpointCreationLock

      protected Object getEndpointCreationLock(String endpointId)
    • handle

      public void handle(R context)
      The handle() method for WebSocket handshaking, called by the front controller once the potential "before" filters have been ran.
      Specified by:
      handle in interface Handler<R extends RequestContext<?>>
    • manageCancellationFromOnPeerPreConnect

      protected void manageCancellationFromOnPeerPreConnect()
      Managed a null returned by the onPeerPreConnect() method of the controller.
    • createWebsocketEndpointHandler

      protected WebsocketEndpointHandler createWebsocketEndpointHandler(String endpointId, WebsocketController<R,W> controller)
    • generatePeerId

      protected String generatePeerId(R context, String endpointId)
      Generate a peer id when none is specified by the controller.