Package org.apache.tomcat.websocket.server

## 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 javax.websocket.server.HandshakeRequest

`SEC_WEBSOCKET_EXTENSIONS, SEC_WEBSOCKET_KEY, SEC_WEBSOCKET_PROTOCOL, SEC_WEBSOCKET_VERSION`

### Constructor Summary

Constructors
`WsHandshakeRequest​(HttpServletRequest request, java.util.Map<java.lang.String,​java.lang.String> pathParams)`

### Method Summary

All Methods Instance Methods Concrete Methods
`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)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### 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 interface `HandshakeRequest`

#### getParameterMap

    public java.util.Map<java.lang.String,​java.util.List<java.lang.String>> getParameterMap()

Specified by:
  `getParameterMap` in interface `HandshakeRequest`

#### getQueryString

    public java.lang.String getQueryString()

Specified by:
  `getQueryString` in interface `HandshakeRequest`

#### getUserPrincipal

    public java.security.Principal getUserPrincipal()

Specified by:
  `getUserPrincipal` in interface `HandshakeRequest`

#### getHeaders

    public java.util.Map<java.lang.String,​java.util.List<java.lang.String>> getHeaders()

Specified by:
  `getHeaders` in interface `HandshakeRequest`

#### isUserInRole

    public boolean isUserInRole​(java.lang.String role)

Specified by:
  `isUserInRole` in interface `HandshakeRequest`

#### getHttpSession

    public java.lang.Object getHttpSession()

Description copied from interface: `javax.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 interface `HandshakeRequest`
Returns:
  The javax.servlet.http.HttpSession object associated with this request, if any.