Class GrpcWebsocket

java.lang.Object
jakarta.websocket.Endpoint
io.grpc.servlet.web.websocket.GrpcWebsocket

public class GrpcWebsocket extends jakarta.websocket.Endpoint
Supports multiple endpoints, based on the negotiated sub-protocol. If a protocol isn't supported, an error will be sent to the client.
  • Constructor Details

    • GrpcWebsocket

      public GrpcWebsocket(Map<String,Supplier<jakarta.websocket.Endpoint>> endpoints)
  • Method Details

    • onOpen

      public void onOpen(jakarta.websocket.Session session, jakarta.websocket.EndpointConfig endpointConfig)
      Specified by:
      onOpen in class jakarta.websocket.Endpoint
    • onClose

      public void onClose(jakarta.websocket.Session session, jakarta.websocket.CloseReason closeReason)
      Overrides:
      onClose in class jakarta.websocket.Endpoint
    • onError

      public void onError(jakarta.websocket.Session session, Throwable thr)
      Overrides:
      onError in class jakarta.websocket.Endpoint