Class WsHandshakeRequest
- java.lang.Object
-
- org.apache.tomcat.websocket.server.WsHandshakeRequest
-
- All Implemented Interfaces:
HandshakeRequest
public class WsHandshakeRequest extends Object implements HandshakeRequest
Represents the request that this session was opened under.
-
-
Field Summary
-
Fields inherited from interface jakarta.websocket.server.HandshakeRequest
SEC_WEBSOCKET_EXTENSIONS, SEC_WEBSOCKET_KEY, SEC_WEBSOCKET_PROTOCOL, SEC_WEBSOCKET_VERSION
-
-
Constructor Summary
Constructors Constructor Description WsHandshakeRequest(HttpServletRequest request, Map<String,String> pathParams)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,List<String>>getHeaders()ObjectgetHttpSession()Get the HTTP Session object associated with this request.Map<String,List<String>>getParameterMap()StringgetQueryString()URIgetRequestURI()PrincipalgetUserPrincipal()booleanisUserInRole(String role)
-
-
-
Constructor Detail
-
WsHandshakeRequest
public WsHandshakeRequest(HttpServletRequest request, Map<String,String> pathParams)
-
-
Method Detail
-
getRequestURI
public URI getRequestURI()
- Specified by:
getRequestURIin interfaceHandshakeRequest
-
getParameterMap
public Map<String,List<String>> getParameterMap()
- Specified by:
getParameterMapin interfaceHandshakeRequest
-
getQueryString
public String getQueryString()
- Specified by:
getQueryStringin interfaceHandshakeRequest
-
getUserPrincipal
public Principal getUserPrincipal()
- Specified by:
getUserPrincipalin interfaceHandshakeRequest
-
getHeaders
public Map<String,List<String>> getHeaders()
- Specified by:
getHeadersin interfaceHandshakeRequest
-
isUserInRole
public boolean isUserInRole(String role)
- Specified by:
isUserInRolein interfaceHandshakeRequest
-
getHttpSession
public Object getHttpSession()
Description copied from interface:jakarta.websocket.server.HandshakeRequestGet the HTTP Session object associated with this request. Object is used to avoid a direct dependency on the Servlet API.- Specified by:
getHttpSessionin interfaceHandshakeRequest- Returns:
- The jakarta.servlet.http.HttpSession object associated with this request, if any.
-
-