HttpUpgradeHandler (Servlet 6.0 API Documentation - Apache Tomcat 10.1.48)
Description: declaration: package: jakarta.servlet.http, interface: HttpUpgradeHandler

# Interface HttpUpgradeHandler

public interface HttpUpgradeHandler
Interface between the HTTP upgrade process and the new protocol.

Since:
  Servlet 3.1

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `destroy()`
  This method is called after the upgraded connection has been closed.
  `void`
  `init(WebConnection connection)`
  This method is called once the request/response pair where `HttpServletRequest.upgrade(Class)` is called has completed processing and is the point where control of the connection passes from the container to the `HttpUpgradeHandler`.

- ## Method Details

  - ### init

    void init(WebConnection connection)
    This method is called once the request/response pair where `HttpServletRequest.upgrade(Class)` is called has completed processing and is the point where control of the connection passes from the container to the `HttpUpgradeHandler`.
    Parameters:
      `connection` - The connection that has been upgraded

  - ### destroy

    void destroy()
    This method is called after the upgraded connection has been closed.