com.ibm.websphere.wsoc

Interface WsWsocServerContainer

  • All Superinterfaces:
    javax.websocket.server.ServerContainer, javax.websocket.WebSocketContainer


    public interface WsWsocServerContainer
    extends javax.websocket.server.ServerContainer
    This interface provides WebSphere specific extensions to WebSocket ServerContainer support. You can access WsWsocServerContainer in a web application through the ServletContext javax.websocket.server.ServerContainer attribute. Example:
     
         ServerContainer container = (ServerContainer) httpServletRequest.getServletContext().getAttribute("javax.websocket.server.ServerContainer");
         if (container instanceof WsWsocServerContainer) {
             WsWsocServerContainer ws = (WsWsocServerContainer) container;
             ...
         }
     
     
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void doUpgrade(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, javax.websocket.server.ServerEndpointConfig sec, java.util.Map<java.lang.String,java.lang.String> pathParams)
      Performs a WebSocket upgrade on provided HttpServletRequest and HttpServletResponse with the specified ServerEndpointConfig.
      • 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 Detail

      • doUpgrade

        void doUpgrade(javax.servlet.http.HttpServletRequest req,
                     javax.servlet.http.HttpServletResponse resp,
                     javax.websocket.server.ServerEndpointConfig sec,
                     java.util.Map<java.lang.String,java.lang.String> pathParams)
                       throws javax.servlet.ServletException,
                              java.io.IOException
        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 - - An HttpServletRequest that will be used for the Websocket upgrade.
        resp - - An HttpSerletResponse that will be used for the Websocket upgrade.
        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
        java.io.IOException
IBM WebSphere Application ServerTM
Release 9.0