Class JakartaWebSocketCreator

java.lang.Object
org.eclipse.jetty.ee10.websocket.jakarta.server.internal.JakartaWebSocketCreator
All Implemented Interfaces:
WebSocketCreator

public class JakartaWebSocketCreator extends Object implements WebSocketCreator
  • Field Details

  • Constructor Details

  • Method Details

    • createWebSocket

      public Object createWebSocket(ServerUpgradeRequest request, ServerUpgradeResponse response, Callback callback)
      Description copied from interface: WebSocketCreator
      Create a websocket from the incoming request.

      If the creator returns null it is responsible for completing the Callback and sending a response. But if the creator intends to return non-null WebSocket object, it MUST NOT write content to the response or complete the Callback, but it may modify the response headers.

      Specified by:
      createWebSocket in interface WebSocketCreator
      Parameters:
      request - the request details
      response - the response details
      callback - the callback, should only be completed by the creator if a null WebSocket object is returned.
      Returns:
      the WebSocket object, or null to take responsibility to send error response if no WebSocket is to be created.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object