Class ClientEndpoint

java.lang.Object
io.deephaven.envoysupport.ClientEndpoint

public class ClientEndpoint extends Object
Provides ClientEndpoint support for a websocket that will be interfacing with a Comm client.
  • Constructor Details

    • ClientEndpoint

      public ClientEndpoint(@NotNull @NotNull String serviceId, @NotNull @NotNull ConnectionStatusHandlerEx connectionStatusHandler, @Nullable @Nullable ExecutorService executor, WebsocketCommClient websocketCommClient)
      Create an instance of ClientEndpoint that can be reused.
      Parameters:
      serviceId - the serviceId of the Comm service
      connectionStatusHandler - will be notified when the connection status changes
      executor - optional executor service for off-thread operations. A single threaded executor service will be created if one isn't supplied.
      websocketCommClient - the Comm client this will connect to the websocket
  • Method Details

    • onOpen

      public void onOpen(@NotNull @NotNull jakarta.websocket.Session session)
    • onMessage

      public void onMessage(@NotNull @NotNull ByteBuffer buffer) throws IOException
      Throws:
      IOException
    • onError

      public void onError(@NotNull @NotNull Throwable reason)
    • onClose

      public void onClose(@NotNull @NotNull jakarta.websocket.CloseReason reason)
    • getSession

      @Nullable public @Nullable jakarta.websocket.Session getSession()
      Provide access to the current session.
      Returns:
      the current session