- All Superinterfaces:
RuntimeType.Api<WsClientConfig>
- All Known Implementing Classes:
DirectWsClient
WebSocket client.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Protocol
<WsClient, WsClientProtocolConfig> Protocol to use to obtain an instance of WebSocket specific client fromWebClient.client(io.helidon.webclient.spi.Protocol)
. -
Method Summary
Modifier and TypeMethodDescriptionstatic WsClientConfig.Builder
builder()
A new fluent API builder to create new instances of client.void
connect
(String path, WsListener listener) Starts a new WebSocket connection and runs it in a new virtual thread.void
connect
(URI uri, WsListener listener) Starts a new WebSocket connection and runs it in a new virtual thread.static WsClient
create
(WsClientConfig clientConfig) Create a new WebSocket client with custom configuration.static WsClient
create
(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 client 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 newWsSession
is 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 newWsSession
is started.- Parameters:
path
- path to connect to, if client uses a base URI, this is resolved against the base URIlistener
- listener to handle WebSocket
-