- All Superinterfaces:
RuntimeType.Api<WsClientConfig>
- All Known Implementing Classes:
DirectWsClient
WebSocket client.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Protocol<WsClient, WsClientProtocolConfig> Protocol to use to obtain an instance of WebSocket specific clietn fromWebClient.client(io.helidon.webclient.spi.Protocol). -
Method Summary
Modifier and TypeMethodDescriptionstatic WsClientConfig.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.static WsClientcreate(WsClientConfig clientConfig) Create a new WebSocket client with custom configuration.static WsClientcreate(Consumer<WsClientConfig.Builder> consumer) Create a new WebSocket client customizing its configuration.Methods inherited from interface io.helidon.builder.api.RuntimeType.Api
prototype
-
Field Details
-
PROTOCOL
Protocol to use to obtain an instance of WebSocket specific clietn fromWebClient.client(io.helidon.webclient.spi.Protocol).
-
-
Method Details
-
builder
A new fluent API builder to create new instances of client.- Returns:
- a new builder
-
create
Create a new WebSocket client with custom configuration.- Parameters:
clientConfig- websocket client configuration- Returns:
- a new WebSocket client
-
create
Create a new WebSocket client customizing its configuration.- Parameters:
consumer- websocket client configuration consumer- Returns:
- a new WebSocket client
-
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
-