Apache Tomcat 7.0.54

org.apache.tomcat.websocket.server
Class UpgradeUtil

java.lang.Object
  extended by org.apache.tomcat.websocket.server.UpgradeUtil

public class UpgradeUtil
extends Object


Method Summary
static void doUpgrade(WsServerContainer sc, HttpServletRequest req, HttpServletResponse resp, ServerEndpointConfig sec, Map<String,String> pathParams)
           
static boolean isWebSocketUpgradeRequest(ServletRequest request, ServletResponse response)
          Checks to see if this is an HTTP request that includes a valid upgrade request to web socket.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isWebSocketUpgradeRequest

public static boolean isWebSocketUpgradeRequest(ServletRequest request,
                                                ServletResponse response)
Checks to see if this is an HTTP request that includes a valid upgrade request to web socket.

Note: RFC 2616 does not limit HTTP upgrade to GET requests but the Java WebSocket spec 1.0, section 8.2 implies such a limitation and RFC 6455 section 4.1 requires that a WebSocket Upgrade uses GET.


doUpgrade

public static void doUpgrade(WsServerContainer sc,
                             HttpServletRequest req,
                             HttpServletResponse resp,
                             ServerEndpointConfig sec,
                             Map<String,String> pathParams)
                      throws ServletException,
                             IOException
Throws:
ServletException
IOException

Apache Tomcat 7.0.54

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