Package io.helidon.webserver.websocket
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.
-
Method Details
-
build
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<WsRouting.Builder,
WsRouting> - Returns:
- instance of the built type
-
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
-