- All Superinterfaces:
RuntimeType.Api<io.helidon.webclient.websocket.WsClientConfig>
- All Known Implementing Classes:
DirectWsClient
WebSocket client.
-
Field Summary
FieldsModifier and TypeFieldDescriptionProtocol to use to obtain an instance of WebSocket specific clietn fromWebClient.client(io.helidon.webclient.spi.Protocol)
. -
Method Summary
Modifier and TypeMethodDescriptionstatic io.helidon.webclient.websocket.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
(io.helidon.webclient.websocket.WsClientConfig clientConfig) Create a new WebSocket client with custom configuration.static WsClient
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
static io.helidon.webclient.websocket.WsClientConfig.Builder 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
-