javax.websocket.server

Interface HandshakeRequest


  • public interface HandshakeRequest
    The handshake request represents the web socket defined Http GET request for the opening handshake of a web socket session.
    Author:
    dannycoward
    • Method Detail

      • getHeaders

        Map<String,List<String>> getHeaders()
        Return the read only Map of Http Headers that came with the handshake request. The header names are case insensitive.
        Returns:
        the list of headers.
      • getUserPrincipal

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

        URI getRequestURI()
        Return the request URI of the handshake request.
        Returns:
        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.
        Parameters:
        role - the role being checked.
        Returns:
        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.
        Returns:
        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.
        Returns:
        the unmodifiable map of the request parameters.
      • getQueryString

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

Document created the 11/06/2005, last modified the 18/08/2025
Source of the printed document:https://www.gaudry.be/en/java-api-javaee-rf-javax/websocket/server/handshakerequest.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.

References

  1. View the html document Language of the document:fr Manuel PHP : https://docs.oracle.com

These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author of this site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.