public class ServletUpgradeRequest extends UpgradeRequest
UpgradeRequest
implementation.Constructor and Description |
---|
ServletUpgradeRequest(javax.servlet.http.HttpServletRequest httpRequest) |
Modifier and Type | Method and Description |
---|---|
void |
complete() |
X509Certificate[] |
getCertificates() |
javax.servlet.http.HttpServletRequest |
getHttpServletRequest()
Return the underlying HttpServletRequest that existed at Upgrade time.
|
String |
getLocalAddress()
Equivalent to
ServletRequest.getLocalAddr() |
Locale |
getLocale()
Equivalent to
ServletRequest.getLocale() |
Enumeration<Locale> |
getLocales()
Equivalent to
ServletRequest.getLocales() |
String |
getLocalHostName()
Equivalent to
ServletRequest.getLocalName() |
int |
getLocalPort()
Equivalent to
ServletRequest.getLocalPort() |
InetSocketAddress |
getLocalSocketAddress()
Return a
InetSocketAddress for the local socket. |
Principal |
getPrincipal()
Deprecated.
use
getUserPrincipal() instead |
String |
getRemoteAddress()
Equivalent to
ServletRequest.getRemoteAddr() |
String |
getRemoteHostName()
Equivalent to
ServletRequest.getRemoteHost() |
int |
getRemotePort()
Equivalent to
ServletRequest.getRemotePort() |
InetSocketAddress |
getRemoteSocketAddress()
Return a
InetSocketAddress for the remote socket. |
String |
getRequestPath() |
Object |
getServletAttribute(String name) |
Map<String,Object> |
getServletAttributes() |
Map<String,List<String>> |
getServletParameters() |
javax.servlet.http.HttpSession |
getSession()
Return the HttpSession if it exists.
|
Principal |
getUserPrincipal()
Equivalent to
HttpServletRequest.getUserPrincipal() |
boolean |
isUserInRole(String role) |
void |
setServletAttribute(String name,
Object value) |
addExtensions, addExtensions, clearHeaders, getCookies, getExtensions, getHeader, getHeaderInt, getHeaders, getHeaders, getHost, getHttpVersion, getMethod, getOrigin, getParameterMap, getProtocolVersion, getQueryString, getRequestURI, getSubProtocols, hasSubProtocol, isOrigin, isSecure, setCookies, setExtensions, setHeader, setHeader, setHeaders, setHttpVersion, setMethod, setParameterMap, setRequestURI, setSession, setSubProtocols, setSubProtocols
public ServletUpgradeRequest(javax.servlet.http.HttpServletRequest httpRequest) throws URISyntaxException
URISyntaxException
public X509Certificate[] getCertificates()
public javax.servlet.http.HttpServletRequest getHttpServletRequest()
Note: many features of the HttpServletRequest are invalid when upgraded, especially ones that deal with body content, streams, readers, and responses.
public String getLocalAddress()
ServletRequest.getLocalAddr()
public String getLocalHostName()
ServletRequest.getLocalName()
public int getLocalPort()
ServletRequest.getLocalPort()
public InetSocketAddress getLocalSocketAddress()
InetSocketAddress
for the local socket.
Warning: this can cause a DNS lookup
public Locale getLocale()
ServletRequest.getLocale()
Locale
for the clientpublic Enumeration<Locale> getLocales()
ServletRequest.getLocales()
@Deprecated public Principal getPrincipal()
getUserPrincipal()
insteadpublic Principal getUserPrincipal()
HttpServletRequest.getUserPrincipal()
getUserPrincipal
in class UpgradeRequest
public String getRemoteAddress()
ServletRequest.getRemoteAddr()
public String getRemoteHostName()
ServletRequest.getRemoteHost()
public int getRemotePort()
ServletRequest.getRemotePort()
public InetSocketAddress getRemoteSocketAddress()
InetSocketAddress
for the remote socket.
Warning: this can cause a DNS lookup
public javax.servlet.http.HttpSession getSession()
Note: this is equivalent to HttpServletRequest.getSession(boolean)
and will not create a new HttpSession.
getSession
in class UpgradeRequest
public boolean isUserInRole(String role)
public String getRequestPath()
public void complete()
Copyright © 1995-2015 Webtide. All Rights Reserved.