Class WsHttpUpgradeHandler
java.lang.Object
org.apache.tomcat.websocket.server.WsHttpUpgradeHandler
- All Implemented Interfaces:
HttpUpgradeHandler
,InternalHttpUpgradeHandler
Servlet 3.1 HTTP upgrade handler for WebSocket connections.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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 whereHttpServletRequest.upgrade(Class)
is called has completed processing and is the point where control of the connection passes from the container to theHttpUpgradeHandler
.void
pause()
void
preInit
(ServerEndpointConfig serverEndpointConfig, WsServerContainer wsc, WsHandshakeRequest handshakeRequest, List<Extension> negotiatedExtensionsPhase2, String subProtocol, Transformation transformation, Map<String, String> pathParameters, boolean secure) void
setSocketWrapper
(SocketWrapperBase<?> socketWrapper) void
setSslSupport
(SSLSupport sslSupport) void
timeoutAsync
(long now) upgradeDispatch
(SocketEvent status)
-
Constructor Details
-
WsHttpUpgradeHandler
public WsHttpUpgradeHandler()
-
-
Method Details
-
setSocketWrapper
- Specified by:
setSocketWrapper
in interfaceInternalHttpUpgradeHandler
-
preInit
public void preInit(ServerEndpointConfig serverEndpointConfig, WsServerContainer wsc, WsHandshakeRequest handshakeRequest, List<Extension> negotiatedExtensionsPhase2, String subProtocol, Transformation transformation, Map<String, String> pathParameters, boolean secure) -
init
Description copied from interface:javax.servlet.http.HttpUpgradeHandler
This method is called once the request/response pair whereHttpServletRequest.upgrade(Class)
is called has completed processing and is the point where control of the connection passes from the container to theHttpUpgradeHandler
.- Specified by:
init
in interfaceHttpUpgradeHandler
- Parameters:
connection
- The connection that has been upgraded
-
getUpgradeInfo
- Specified by:
getUpgradeInfo
in interfaceInternalHttpUpgradeHandler
-
upgradeDispatch
- Specified by:
upgradeDispatch
in interfaceInternalHttpUpgradeHandler
-
timeoutAsync
public void timeoutAsync(long now) - Specified by:
timeoutAsync
in interfaceInternalHttpUpgradeHandler
-
pause
public void pause()- Specified by:
pause
in interfaceInternalHttpUpgradeHandler
-
destroy
public void destroy()Description copied from interface:javax.servlet.http.HttpUpgradeHandler
This method is called after the upgraded connection has been closed.- Specified by:
destroy
in interfaceHttpUpgradeHandler
-
setSslSupport
- Specified by:
setSslSupport
in interfaceInternalHttpUpgradeHandler
-