Class WsServerContainer

    • Method Detail

      • doUpgrade

        public void doUpgrade​(HttpServletRequest request,
                              HttpServletResponse response,
                              ServerEndpointConfig sec,
                              java.util.Map<java.lang.String,​java.lang.String> pathParams)
                       throws ServletException,
                              java.io.IOException
        Until the WebSocket specification provides such a mechanism, this Tomcat proprietary method is provided to enable applications to programmatically determine whether or not to upgrade an individual request to WebSocket.

        Note: This method is not used by Tomcat but is used directly by third-party code and must not be removed.

        Parameters:
        request - The request object to be upgraded
        response - The response object to be populated with the result of the upgrade
        sec - The server endpoint to use to process the upgrade request
        pathParams - The path parameters associated with the upgrade request
        Throws:
        ServletException - If a configuration error prevents the upgrade from taking place
        java.io.IOException - If an I/O error occurs during the upgrade process
      • findMapping

        public org.apache.tomcat.websocket.server.WsMappingResult findMapping​(java.lang.String path)
      • isEnforceNoAddAfterHandshake

        public boolean isEnforceNoAddAfterHandshake()
      • setEnforceNoAddAfterHandshake

        public void setEnforceNoAddAfterHandshake​(boolean enforceNoAddAfterHandshake)
      • registerSession

        protected void registerSession​(java.lang.Object key,
                                       WsSession wsSession)
        Overridden to make it visible to other classes in this package.
        Overrides:
        registerSession in class WsWebSocketContainer
      • closeAuthenticatedSession

        public void closeAuthenticatedSession​(java.lang.String httpSessionId)