Package io.karatelabs.http
Class WsClientOptions.Builder
java.lang.Object
io.karatelabs.http.WsClientOptions.Builder
- Enclosing class:
WsClientOptions
-
Method Summary
Modifier and TypeMethodDescriptionbuild()callbackExecutor(ExecutorService executor) compression(boolean enabled) connectTimeout(Duration timeout) maxPayloadSize(int size) Register a close listener before the connection is opened (seeonMessage(java.util.function.Consumer<io.karatelabs.http.WsFrame>)).Register an error listener before the connection is opened (seeonMessage(java.util.function.Consumer<io.karatelabs.http.WsFrame>)).Register a message listener BEFORE the connection is opened.pingInterval(Duration interval) sslContext(io.netty.handler.ssl.SslContext context) subProtocol(String subProtocol) The WebSocket subprotocol to negotiate during the handshake (Sec-WebSocket-Protocol).trustAllCerts(boolean trust)
-
Method Details
-
headers
-
header
-
subProtocol
The WebSocket subprotocol to negotiate during the handshake (Sec-WebSocket-Protocol). -
compression
-
maxPayloadSize
-
connectTimeout
-
pingInterval
-
disablePing
-
sslContext
-
trustAllCerts
-
callbackExecutor
-
onMessage
Register a message listener BEFORE the connection is opened. For server-speaks-first protocols (e.g. RFB/VNC behind websockify) a listener added afterWsClient.connect(java.lang.String)returns can miss the server's opening frame. -
onClose
Register a close listener before the connection is opened (seeonMessage(java.util.function.Consumer<io.karatelabs.http.WsFrame>)). -
onError
Register an error listener before the connection is opened (seeonMessage(java.util.function.Consumer<io.karatelabs.http.WsFrame>)). -
build
-