Interface WebSocketClient
- All Superinterfaces:
Measured
-
Method Summary
Modifier and TypeMethodDescriptionclose()Close immediately (shutdown(0, TimeUnit.SECONDS).Connect a WebSocket to the specified port, host and relative request URI.connect(WebSocketConnectOptions options) Connect a WebSocket with the specified options.Connect a WebSocket to the default client port, default client host and specified, relative request URI.Connect a WebSocket to the default client port and specified host and relative request URI.shutdown()Shutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)).Callsshutdown(Duration).Initiate the client shutdown sequence.updateSSLOptions(ClientSSLOptions options) Update the client with new SSLoptions, the update happens if the options object is valid and different from the existing options object.updateSSLOptions(ClientSSLOptions options, boolean force) Update the client with new SSLoptions, the update happens if the options object is valid and different from the existing options object.Create a WebSocket that is not yet connected to the server.Methods inherited from interface Measured
isMetricsEnabled
-
Method Details
-
webSocket
ClientWebSocket webSocket()Create a WebSocket that is not yet connected to the server.- Returns:
- the client WebSocket
-
connect
-
connect
-
connect
-
connect
Connect a WebSocket with the specified options.- Parameters:
options- the request options- Returns:
- a future notified when the WebSocket when connected
-
shutdown
-
close
-
updateSSLOptions
Update the client with new SSLoptions, the update happens if the options object is valid and different from the existing options object.- Parameters:
options- the new SSL options- Returns:
- a future signaling the update success
-
updateSSLOptions
Update the client with new SSL
options, the update happens if the options object is valid and different from the existing options object.The
optionsobject is compared using itsequalsmethod against the existing options to prevent an update when the objects are equals since loading options can be costly, this can happen for share TCP servers. When object are equals, settingforcetotrueforces the update.- Parameters:
options- the new SSL optionsforce- force the update when options are equals- Returns:
- a future signaling the update success
-
shutdown
Callsshutdown(Duration). -
shutdown
-