public interface HandshakeRequest
Modifier and Type | Field and Description |
---|---|
static String |
SEC_WEBSOCKET_EXTENSIONS
The Sec-WebSocket-Extensions header name
|
static String |
SEC_WEBSOCKET_KEY
The Sec-WebSocket-Key header name
|
static String |
SEC_WEBSOCKET_PROTOCOL
The Sec-WebSocket-Protocol header name
|
static String |
SEC_WEBSOCKET_VERSION
The Sec-WebSocket-Version header name
|
Modifier and Type | Method and Description |
---|---|
Map<String,List<String>> |
getHeaders()
Return the read only map of HTTP headers to header values that came with the handshake request.
|
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.
|
Map<String,List<String>> |
getParameterMap()
Return the request parameters associated with the request.
|
String |
getQueryString()
Return the query string associated with the request.
|
URI |
getRequestURI()
Return the request URI of the handshake request.
|
Principal |
getUserPrincipal()
Return the authenticated user or
null if no user is authenticated for this handshake. |
boolean |
isUserInRole(String role)
Checks whether the current user is in the given role.
|
static final String SEC_WEBSOCKET_KEY
static final String SEC_WEBSOCKET_PROTOCOL
static final String SEC_WEBSOCKET_VERSION
static final String SEC_WEBSOCKET_EXTENSIONS
Map<String,List<String>> getHeaders()
Principal getUserPrincipal()
null
if no user is authenticated for this handshake.URI getRequestURI()
boolean isUserInRole(String role)
false
.role
- the role being checked.Object getHttpSession()
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.Map<String,List<String>> getParameterMap()
String getQueryString()
Copyright © 2018,2020 Eclipse Foundation.
Use is subject to license terms.