Package io.deephaven.envoysupport
Class ClientEndpoint
java.lang.Object
io.deephaven.envoysupport.ClientEndpoint
Provides ClientEndpoint support for a websocket that will be interfacing with a Comm client.
-
Constructor Summary
ConstructorsConstructorDescriptionClientEndpoint(@NotNull String serviceId, @NotNull ConnectionStatusHandlerEx connectionStatusHandler, @Nullable ExecutorService executor, WebsocketCommClient websocketCommClient) Create an instance of ClientEndpoint that can be reused. -
Method Summary
Modifier and TypeMethodDescription@Nullable jakarta.websocket.SessionProvide access to the current session.voidonClose(@NotNull jakarta.websocket.CloseReason reason) voidvoidonMessage(@NotNull ByteBuffer buffer) voidonOpen(@NotNull jakarta.websocket.Session session)
-
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 serviceconnectionStatusHandler- will be notified when the connection status changesexecutor- 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
- Throws:
IOException
-
onError
-
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
-