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 TypeMethodDescriptionvoidconnect(String path, WsListener listener) Starts a new WebSocket connection and runs it in a new virtual thread.voidconnect(URI uri, WsListener clientListener) Starts a new WebSocket connection and runs it in a new virtual thread.static DirectWsClientCreate 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:WsClientStarts a new WebSocket connection and runs it in a new virtual thread. This method returns when the connection is established and a newWsSessionis started. -
connect
Description copied from interface:WsClientStarts a new WebSocket connection and runs it in a new virtual thread. This method returns when the connection is established and a newWsSessionis started. -
prototype
Description copied from interface:RuntimeType.ApiThe prototype as it was received when creating this runtime object instance.- Specified by:
prototypein interfaceRuntimeType.Api<WsClientConfig>- Returns:
- prototype object used to create this instance
-