org.apache.tomcat.websocket.server

## Class WsHttpUpgradeHandler

- java.lang.Object
- - org.apache.tomcat.websocket.server.WsHttpUpgradeHandler

- All Implemented Interfaces:
    HttpUpgradeHandler

      public class WsHttpUpgradeHandler
      extends Object
      implements HttpUpgradeHandler

  Servlet 3.1 HTTP upgrade handler for WebSocket connections.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `WsHttpUpgradeHandler()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and 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 the upgrade is initiated has completed processing and is the point where control of the connection passes from the container to the `HttpUpgradeHandler`.
    `void` | `preInit(Endpoint ep, EndpointConfig endpointConfig, WsServerContainer wsc, WsHandshakeRequest handshakeRequest, List<Extension> negotiatedExtensionsPhase2, String subProtocol, Transformation transformation, Map<String,String> pathParameters, boolean secure)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### WsHttpUpgradeHandler

          public WsHttpUpgradeHandler()

  - ### Method Detail

    - #### preInit

          public void preInit(Endpoint ep,
                     EndpointConfig endpointConfig,
                     WsServerContainer wsc,
                     WsHandshakeRequest handshakeRequest,
                     List<Extension> negotiatedExtensionsPhase2,
                     String subProtocol,
                     Transformation transformation,
                     Map<String,String> pathParameters,
                     boolean secure)

    - #### init

          public void init(WebConnection connection)

      Description copied from interface: `HttpUpgradeHandler`
      This method is called once the request/response pair where the upgrade is initiated has completed processing and is the point where control of the connection passes from the container to the `HttpUpgradeHandler`.
      Specified by:
        `init` in interface `HttpUpgradeHandler`
      Parameters:
        `connection` - The connection that has been upgraded

    - #### destroy

          public void destroy()

      Description copied from interface: `HttpUpgradeHandler`
      This method is called after the upgraded connection has been closed.
      Specified by:
        `destroy` in interface `HttpUpgradeHandler`

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.