java.lang.Object
io.helidon.webserver.websocket.WsRoute
All Implemented Interfaces:
Route, ServerLifecycle

public class WsRoute extends Object implements Route
WebSocket route. Result of routing in WsRouting.findRoute(io.helidon.http.HttpPrologue).
  • Method Details

    • create

      public static WsRoute create(String path, WsListener listener)
      Create a new WebSocket route for a specific path.
      Parameters:
      path - path of the websocket endpoint
      listener - listener instance to use for all connections
      Returns:
      a new route
    • create

      public static WsRoute create(String path, Supplier<? extends WsListener> listener)
      Create a new WebSocket route for a specific path.
      Parameters:
      path - path of the websocket endpoint
      listener - supplier of listener instances, a new instance will be used for each connection
      Returns:
      a new route
    • listener

      public WsListener listener()
      WebSocket listener associated with this route.
      Returns:
      listener