Class WsRouting.Builder

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

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

    • build

      public WsRouting build()
      Description copied from interface: Builder
      Build the instance from this builder.
      Specified by:
      build in interface Builder<WsRouting.Builder,WsRouting>
      Returns:
      instance of the built type
    • 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