Class WebSockets

java.lang.Object
jenkins.websocket.WebSockets

@Restricted(org.kohsuke.accmod.restrictions.Beta.class) public class WebSockets extends Object
Support for serving WebSocket responses.
Since:
2.216
  • Method Details

    • upgrade

      public static org.kohsuke.stapler.HttpResponse upgrade(WebSocketSession session)
    • upgradeResponse

      public static void upgradeResponse(WebSocketSession session, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse rsp) throws IOException, jakarta.servlet.ServletException
      Variant of upgrade(jenkins.websocket.WebSocketSession) that does not presume a StaplerRequest2.
      Throws:
      IOException
      jakarta.servlet.ServletException
      Since:
      2.446
    • isSupported

      public static boolean isSupported()