Package io.helidon.nima.websocket.client
Class WsClient.Builder
java.lang.Object
io.helidon.nima.webclient.WebClient.Builder<WsClient.Builder,WsClient>
io.helidon.nima.websocket.client.WsClient.Builder
- All Implemented Interfaces:
Builder<WsClient.Builder,,WsClient> Supplier<WsClient>
- Enclosing interface:
WsClient
Fluent API builder for
WsClient.-
Method Summary
Modifier and TypeMethodDescriptionaddSubProtocol(String preferred) Add sub-protocol.build()Build the instance from this builder.header(Http.HeaderValue header) Configure a custom header to be sent.subProtocols(String... preferred) Configure sub-protocols.Methods inherited from class io.helidon.nima.webclient.WebClient.Builder
baseUri, baseUri, channelOptions, dnsAddressLookup, dnsResolver, tls, tls
-
Method Details
-
build
Description copied from interface:BuilderBuild the instance from this builder.- Returns:
- instance of the built type
-
addSubProtocol
Add sub-protocol. A list of preferred sub-protocols is sent to server, and it chooses zero or one of them.- Parameters:
preferred- preferred sub-protocol to use, first one added is considered to be the most desired one- Returns:
- updated builder instance
-
subProtocols
Configure sub-protocols. A list of preferred sub-protocols is sent to server, and it chooses zero or one of them.- Parameters:
preferred- preferred sub-protocols to use- Returns:
- updated builder instance
-
header
Configure a custom header to be sent. Some headers cannot be modified (Upgrade, WebSocket version, Content Length).- Parameters:
header- header to add- Returns:
- updated builder instance
-