Interface HttpServer.WebSocketRegistry

Enclosing class:
HttpServer

public static interface HttpServer.WebSocketRegistry
What a HttpServer.WebSocketRoutes callback puts its endpoints into.
  • Method Details

    • route

      void route(String path, WebSocket endpoint)

      Serves path with endpoint.

      The path is matched against the request's CANONICAL path -- percent escapes decoded, query removed -- exactly as an HTTP route is, so a key that could never be selected is refused here rather than accepted and left unreachable.

    • fallback

      void fallback(HttpServer.WebSocketHandler router)
      Consulted for any upgrade route(String, WebSocket) did not claim.