Class WsRoute
java.lang.Object
io.helidon.webserver.websocket.WsRoute
- All Implemented Interfaces:
Route, ServerLifecycle
WebSocket route. Result of routing in
WsRouting.findRoute(io.helidon.http.HttpPrologue).-
Method Summary
Modifier and TypeMethodDescriptionstatic WsRoutecreate(String path, WsListener listener) Create a new WebSocket route for a specific path.static WsRoutecreate(String path, Supplier<? extends WsListener> listener) Create a new WebSocket route for a specific path.listener()WebSocket listener associated with this route.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ServerLifecycle
afterStart, afterStop, beforeStartModifier and TypeMethodDescriptiondefault voidafterStart(WebServer webServer) After server start.default voidAfter server stop.default voidBefore server start.
-
Method Details
-
create
Create a new WebSocket route for a specific path.- Parameters:
path- path of the websocket endpointlistener- listener instance to use for all connections- Returns:
- a new route
-
create
Create a new WebSocket route for a specific path.- Parameters:
path- path of the websocket endpointlistener- supplier of listener instances, a new instance will be used for each connection- Returns:
- a new route
-
listener
-