Interface JettyServerUpgradeRequest
- All Superinterfaces:
UpgradeRequest
- All Known Implementing Classes:
DelegatedServerUpgradeRequest
-
Method Summary
Modifier and TypeMethodDescriptionjavax.servlet.http.HttpServletRequest
getServletAttribute
(String name) Access the Servlet HTTP Session (if present)boolean
isUserInRole
(String role) void
setServletAttribute
(String name, Object value) Methods inherited from interface org.eclipse.jetty.websocket.api.UpgradeRequest
getCookies, getExtensions, getHeader, getHeaderInt, getHeaders, getHeaders, getHost, getHttpVersion, getMethod, getOrigin, getParameterMap, getProtocolVersion, getQueryString, getRequestURI, getSubProtocols, getUserPrincipal, hasSubProtocol, isSecure
-
Method Details
-
getSession
Object getSession()Access the Servlet HTTP Session (if present)Note: Never present on a Client UpgradeRequest.
- Returns:
- the Servlet HTTPSession on server side UpgradeRequests
-
getCertificates
X509Certificate[] getCertificates()- Returns:
- The
X509Certificate
instance at request attribute "javax.servlet.request.X509Certificate" or null.
-
getHttpServletRequest
javax.servlet.http.HttpServletRequest getHttpServletRequest()- Returns:
- Immutable version of
HttpServletRequest
-
getLocale
Locale getLocale()- Returns:
- The requested Locale
- See Also:
-
ServletRequest.getLocale()
-
getLocales
Enumeration<Locale> getLocales()- Returns:
- The requested Locales
- See Also:
-
ServletRequest.getLocales()
-
getLocalSocketAddress
SocketAddress getLocalSocketAddress()- Returns:
- The local requested address, which is typically an
InetSocketAddress
, but may be another derivation ofSocketAddress
- See Also:
-
ServletRequest.getLocalAddr()
ServletRequest.getLocalPort()
-
getRemoteSocketAddress
SocketAddress getRemoteSocketAddress()- Returns:
- The remote request address, which is typically an
InetSocketAddress
, but may be another derivation ofSocketAddress
- See Also:
-
ServletRequest.getRemoteAddr()
ServletRequest.getRemotePort()
-
getRequestPath
String getRequestPath()- Returns:
- The request URI path within the context
-
getServletAttribute
- Parameters:
name
- Attribute name- Returns:
- Attribute value or null
- See Also:
-
ServletRequest.getAttribute(String)
-
getServletAttributes
- Returns:
- Request attribute map
-
getServletParameters
- Returns:
- Request parameters
- See Also:
-
ServletRequest.getParameterMap()
-
isUserInRole
- Parameters:
role
- The user role- Returns:
- True if the requests user has the role
- See Also:
-
HttpServletRequest.isUserInRole(String)
-
setServletAttribute
- Parameters:
name
- Attribute namevalue
- Attribute value to set- See Also:
-
ServletRequest.setAttribute(String, Object)
-