Top Description Fields Constructors Methods
org.apache.tomcat.websocket.server

public Class WsHandshakeRequest

extends Object
implements HandshakeRequest
Class Inheritance
All Implemented Interfaces
jakarta.websocket.server.HandshakeRequest
Imports
java.net.URI, .URISyntaxException, java.security.Principal, java.util.Arrays, .Collections, .Enumeration, .HashMap, .List, .Map, .Map.Entry, jakarta.servlet.http.HttpServletRequest, jakarta.websocket.server.HandshakeRequest, org.apache.tomcat.util.collections.CaseInsensitiveKeyMap, org.apache.tomcat.util.res.StringManager

Represents the request that this session was opened under.

Field Summary

Modifier and TypeField and Description
private final Map<String, List<String>>
private final Object
private final Map<String, List<String>>
private final String
private volatile HttpServletRequest
private final URI
private static final StringManager
private final Principal

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static URI
pack-priv void
finished()

Called when the HandshakeRequest is no longer required.

public Map<String, List<String>>
public Object
getHttpSession()

Implements jakarta.websocket.server.HandshakeRequest.getHttpSession.

Get the HTTP Session object associated with this request.

public Map<String, List<String>>
public String
public URI
public Principal
public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

headersback to summary
private final Map<String, List<String>> headers
httpSessionback to summary
private final Object httpSession
parameterMapback to summary
private final Map<String, List<String>> parameterMap
queryStringback to summary
private final String queryString
requestback to summary
private volatile HttpServletRequest request
requestUriback to summary
private final URI requestUri
smback to summary
private static final StringManager sm
userPrincipalback to summary
private final Principal userPrincipal

Constructor Detail

WsHandshakeRequestback to summary
public WsHandshakeRequest(HttpServletRequest request, Map<String, String> pathParams)

Method Detail

buildRequestUriback to summary
private static URI buildRequestUri(HttpServletRequest req)
finishedback to summary
pack-priv void finished()

Called when the HandshakeRequest is no longer required. Since an instance of this class retains a reference to the current HttpServletRequest that reference needs to be cleared as the HttpServletRequest may be reused. There is no reason for instances of this class to be accessed once the handshake has been completed.

getHeadersback to summary
public Map<String, List<String>> getHeaders()

Implements jakarta.websocket.server.HandshakeRequest.getHeaders.

Annotations
@Override
getHttpSessionback to summary
public Object getHttpSession()

Implements jakarta.websocket.server.HandshakeRequest.getHttpSession.

Doc from jakarta.websocket.server.HandshakeRequest.getHttpSession.

Get the HTTP Session object associated with this request. Object is used to avoid a direct dependency on the Servlet API.

Returns:Object

The jakarta.servlet.http.HttpSession object associated with this request, if any.

Annotations
@Override
getParameterMapback to summary
public Map<String, List<String>> getParameterMap()

Implements jakarta.websocket.server.HandshakeRequest.getParameterMap.

Annotations
@Override
getQueryStringback to summary
public String getQueryString()

Implements jakarta.websocket.server.HandshakeRequest.getQueryString.

Annotations
@Override
getRequestURIback to summary
public URI getRequestURI()

Implements jakarta.websocket.server.HandshakeRequest.getRequestURI.

Annotations
@Override
getUserPrincipalback to summary
public Principal getUserPrincipal()

Implements jakarta.websocket.server.HandshakeRequest.getUserPrincipal.

Annotations
@Override
isUserInRoleback to summary
public boolean isUserInRole(String role)

Implements jakarta.websocket.server.HandshakeRequest.isUserInRole.

Annotations
@Override