Class WsRouting.Builder

java.lang.Object
io.helidon.webserver.websocket.WsRouting.Builder
All Implemented Interfaces:
io.helidon.common.Builder<WsRouting.Builder,WsRouting>, Supplier<WsRouting>
Enclosing class:
WsRouting

public static class WsRouting.Builder extends Object implements io.helidon.common.Builder<WsRouting.Builder,WsRouting>
Fluent API builder for WsRouting.
  • Method Details

    • build

      public WsRouting build()
      Specified by:
      build in interface io.helidon.common.Builder<WsRouting.Builder,WsRouting>
    • endpoint

      public WsRouting.Builder endpoint(String path, WsListener listener)
      Add endpoint.
      Parameters:
      path - path of the endpoint
      listener - listener to use, the same instance will be used for all connections
      Returns:
      updated builder
    • endpoint

      public WsRouting.Builder endpoint(String path, Supplier<WsListener> listener)
      Add endpoint.
      Parameters:
      path - path of the endpoint
      listener - listener supplier, a new instance will be used for each connection
      Returns:
      updated builder