All Superinterfaces:
WebClient
All Known Implementing Classes:
DirectWsClient

public interface WsClient extends WebClient
WebSocket client.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    Fluent API builder for WsClient.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
  • Method Details

    • builder

      static WsClient.Builder builder()
      A new fluent API builder to create new instances of client.
      Returns:
      a new builder
    • connect

      void connect(URI uri, WsListener listener)
      Starts a new WebSocket connection and runs it in a new virtual thread. This method returns when the connection is established and a new WsSession is started.
      Parameters:
      uri - URI to connect to
      listener - listener to handle WebSocket
    • connect

      void connect(String path, WsListener listener)
      Starts a new WebSocket connection and runs it in a new virtual thread. This method returns when the connection is established and a new WsSession is started.
      Parameters:
      path - path to connect to, if client uses a base URI, this is resolved against the base URI
      listener - listener to handle WebSocket