Interface HandshakeRequest

  • public interface HandshakeRequest
    The handshake request represents the WebSocket defined HTTP GET request for the opening handshake of a WebSocket session.
    • Method Detail

      • getHeaders

        Map<String,​List<String>> getHeaders()
        Return the read only map of HTTP headers to header values that came with the handshake request. Note that the lookup of header names will be performed in a case insensitive manner.
        the list of headers.
      • getUserPrincipal

        Principal getUserPrincipal()
        Return the authenticated user or null if no user is authenticated for this handshake.
        the user principal.
      • getRequestURI

        URI getRequestURI()
        Return the request URI of the handshake request.
        the request uri of the handshake request.
      • isUserInRole

        boolean isUserInRole​(String role)
        Checks whether the current user is in the given role. Roles and role membership can be defined using deployment descriptors of the containing WAR file, if running in a Java EE web container. If the user has not been authenticated, the method returns false.
        role - the role being checked.
        whether the authenticated user is in the role, or false if the user has not been authenticated.
      • getHttpSession

        Object getHttpSession()
        Return a reference to the HttpSession that the web socket handshake that started this conversation was part of, if the implementation is part of a Java EE web container.
        the http session or null if either the websocket implementation is not part of a Java EE web container, or there is no HttpSession associated with the opening handshake request.
      • getParameterMap

        Map<String,​List<String>> getParameterMap()
        Return the request parameters associated with the request.
        the unmodifiable map of the request parameters.
      • getQueryString

        String getQueryString()
        Return the query string associated with the request.
        the query string.