Class DirectWsClient
java.lang.Object
io.helidon.webserver.testing.junit5.websocket.DirectWsClient
- All Implemented Interfaces:
RuntimeType.Api<WsClientConfig>
,WsClient
A client for WebSocket, that directly invokes routing (and bypasses network).
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
connect
(String path, WsListener listener) Starts a new WebSocket connection and runs it in a new virtual thread.void
connect
(URI uri, WsListener clientListener) Starts a new WebSocket connection and runs it in a new virtual thread.static DirectWsClient
Create a new client based on the provided routing.The prototype as it was received when creating this runtime object instance.
-
Method Details
-
create
Create a new client based on the provided routing.- Parameters:
routing
- used to discover route to handle a new connection- Returns:
- a new instance for the provided routing
-
connect
Description copied from interface:WsClient
Starts a new WebSocket connection and runs it in a new virtual thread. This method returns when the connection is established and a newWsSession
is started. -
connect
Description copied from interface:WsClient
Starts a new WebSocket connection and runs it in a new virtual thread. This method returns when the connection is established and a newWsSession
is started. -
prototype
Description copied from interface:RuntimeType.Api
The prototype as it was received when creating this runtime object instance.- Specified by:
prototype
in interfaceRuntimeType.Api<WsClientConfig>
- Returns:
- prototype object used to create this instance
-