Class WebSocket


public final class WebSocket extends Transport
WebSocket transport.
  • Field Details

  • Constructor Details

  • Method Details

    • getInitialQuery

      public Map<String,String> getInitialQuery()
      Description copied from class: Transport
      Get the query parameters of the initial HTTP request.
      Specified by:
      getInitialQuery in class Transport
      Returns:
      Query parameters of the initial HTTP request.
    • getInitialHeaders

      public Map<String,List<String>> getInitialHeaders()
      Description copied from class: Transport
      Get the headers of the initial HTTP request.
      Specified by:
      getInitialHeaders in class Transport
      Returns:
      Headers of the initial HTTP request.
    • onRequest

      public void onRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
      Description copied from class: Transport
      Handle a client HTTP request.
      Specified by:
      onRequest in class Transport
      Parameters:
      request - The HTTP request object.
      response - The HTTP response object.
    • send

      public void send(List<Packet<?>> packets)
      Description copied from class: Transport
      Send a list of packets over the transport.
      Specified by:
      send in class Transport
      Parameters:
      packets - List of packets to send.
    • isWritable

      public boolean isWritable()
      Description copied from class: Transport
      Checks whether the transport is currently writable.
      Specified by:
      isWritable in class Transport
      Returns:
      Boolean value indicating if transport can be written to.
    • getName

      public String getName()
      Description copied from class: Transport
      Get the name of this transport.
      Specified by:
      getName in class Transport
      Returns:
      Name of transport.
    • doClose

      protected void doClose()
      Description copied from class: Transport
      Transport specific logic for closing transport.
      Specified by:
      doClose in class Transport