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 Summary
Modifier and TypeMethodDescriptionbuild()Build the instance from this builder.endpoint(String path, WsListener listener) Add endpoint.endpoint(String path, Supplier<WsListener> listener) Add endpoint.Add a WebSocket route.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Builder
get, identity, updateModifier and TypeMethodDescriptiondefault WsRoutingget()default WsRouting.Builderidentity()Instance of this builder as the correct type.default WsRouting.Builderupdate(Consumer<WsRouting.Builder> consumer) Update the builder in a fluent API way.
-
Method Details
-
build
-
endpoint
Add endpoint.- Parameters:
path- path of the endpointlistener- listener to use, the same instance will be used for all connections- Returns:
- updated builder
-
endpoint
Add endpoint.- Parameters:
path- path of the endpointlistener- listener supplier, a new instance will be used for each connection- Returns:
- updated builder
-
route
Add a WebSocket route.- Parameters:
wsRoute- route to add- Returns:
- updated builder
-