Class WsHandshakeRequest
- java.lang.Object
-
- org.apache.tomcat.websocket.server.WsHandshakeRequest
-
- All Implemented Interfaces:
HandshakeRequest
public class WsHandshakeRequest extends java.lang.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, java.util.Map<java.lang.String,java.lang.String> pathParams)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.util.List<java.lang.String>>
getHeaders()
java.lang.Object
getHttpSession()
Get the HTTP Session object associated with this request.java.util.Map<java.lang.String,java.util.List<java.lang.String>>
getParameterMap()
java.lang.String
getQueryString()
java.net.URI
getRequestURI()
java.security.Principal
getUserPrincipal()
boolean
isUserInRole(java.lang.String role)
-
-
-
Constructor Detail
-
WsHandshakeRequest
public WsHandshakeRequest(HttpServletRequest request, java.util.Map<java.lang.String,java.lang.String> pathParams)
-
-
Method Detail
-
getRequestURI
public java.net.URI getRequestURI()
- Specified by:
getRequestURI
in interfaceHandshakeRequest
-
getParameterMap
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getParameterMap()
- Specified by:
getParameterMap
in interfaceHandshakeRequest
-
getQueryString
public java.lang.String getQueryString()
- Specified by:
getQueryString
in interfaceHandshakeRequest
-
getUserPrincipal
public java.security.Principal getUserPrincipal()
- Specified by:
getUserPrincipal
in interfaceHandshakeRequest
-
getHeaders
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getHeaders()
- Specified by:
getHeaders
in interfaceHandshakeRequest
-
isUserInRole
public boolean isUserInRole(java.lang.String role)
- Specified by:
isUserInRole
in interfaceHandshakeRequest
-
getHttpSession
public java.lang.Object getHttpSession()
Description copied from interface:jakarta.websocket.server.HandshakeRequest
Get the HTTP Session object associated with this request. Object is used to avoid a direct dependency on the Servlet API.- Specified by:
getHttpSession
in interfaceHandshakeRequest
- Returns:
- The jakarta.servlet.http.HttpSession object associated with this request, if any.
-
-