- All Superinterfaces:
WebClient
- All Known Implementing Classes:
DirectWsClient
WebSocket client.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic WsClient.Builderbuilder()A new fluent API builder to create new instances of client.voidconnect(String path, WsListener listener) Starts a new WebSocket connection and runs it in a new virtual thread.voidconnect(URI uri, WsListener listener) Starts a new WebSocket connection and runs it in a new virtual thread.
-
Method Details
-
builder
A new fluent API builder to create new instances of client.- Returns:
- a new builder
-
connect
Starts a new WebSocket connection and runs it in a new virtual thread. This method returns when the connection is established and a newWsSessionis started.- Parameters:
uri- URI to connect tolistener- listener to handle WebSocket
-
connect
Starts a new WebSocket connection and runs it in a new virtual thread. This method returns when the connection is established and a newWsSessionis started.- Parameters:
path- path to connect to, if client uses a base URI, this is resolved against the base URIlistener- listener to handle WebSocket
-