Package com.ibm.websphere.wsoc
Interface WsWsocServerContainer
- All Superinterfaces:
javax.websocket.server.ServerContainer
,javax.websocket.WebSocketContainer
Deprecated.
Since websocket-2.1 - This SPI is no longer necessary: the jakarta.websocket.server.ServerContainer now has upgradeHttpToWebSocket as part of the WebSocket 2.1 API.
This interface provides WebSphere specific extensions to WebSocket ServerContainer support.
Example:
ServerContainer container = (ServerContainer) httpServletRequest.getServletContext().getAttribute("javax.websocket.server.ServerContainer");
if (container instanceof WsWsocServerContainer) {
WsWsocServerContainer ws = (WsWsocServerContainer) container;
...
}
-
Method Summary
Modifier and TypeMethodDescriptionvoid
doUpgrade
(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, javax.websocket.server.ServerEndpointConfig sec, Map<String, String> pathParams) Deprecated.Since websocket-2.1 - Use jakarta.websocket.server.ServerContainer#upgradeHttpToWebSocket(Object httpServletRequest, Object httpServletResponse, ServerEndpointConfig sec, Map<String,String> pathParameters) instead.Methods inherited from interface javax.websocket.server.ServerContainer
addEndpoint, addEndpoint
Methods inherited from interface javax.websocket.WebSocketContainer
connectToServer, connectToServer, connectToServer, connectToServer, getDefaultAsyncSendTimeout, getDefaultMaxBinaryMessageBufferSize, getDefaultMaxSessionIdleTimeout, getDefaultMaxTextMessageBufferSize, getInstalledExtensions, setAsyncSendTimeout, setDefaultMaxBinaryMessageBufferSize, setDefaultMaxSessionIdleTimeout, setDefaultMaxTextMessageBufferSize
-
Method Details
-
doUpgrade
@Deprecated void doUpgrade(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, javax.websocket.server.ServerEndpointConfig sec, Map<String, String> pathParams) throws javax.servlet.ServletException, IOExceptionDeprecated.Since websocket-2.1 - Use jakarta.websocket.server.ServerContainer#upgradeHttpToWebSocket(Object httpServletRequest, Object httpServletResponse, ServerEndpointConfig sec, Map<String,String> pathParameters) instead.Performs a WebSocket upgrade on provided HttpServletRequest and HttpServletResponse with the specified ServerEndpointConfig. After a call to doUpgrade, the servlet response is committed and you will be unable to write additional data or change the response code.- Parameters:
req
- -resp
- -serverEndpointConfig
- - server endpoint config object representing a WebSocket endpoint - either programmatic or annotated.pathParams
- - additional parameters that will be made availble thorugh wsoc Session.getRequestParameterMap- Throws:
javax.servlet.ServletException
IOException
-