public class ServletUpgradeRequest extends Object implements UpgradeRequest
UpgradeRequest implementation.| Constructor and Description |
|---|
ServletUpgradeRequest(HttpServletRequest httpRequest) |
public ServletUpgradeRequest(HttpServletRequest httpRequest) throws URISyntaxException
URISyntaxExceptionpublic void addExtensions(ExtensionConfig... configs)
addExtensions in interface UpgradeRequestpublic void addExtensions(String... configs)
addExtensions in interface UpgradeRequestpublic void clearHeaders()
clearHeaders in interface UpgradeRequestpublic void complete()
public X509Certificate[] getCertificates()
public List<HttpCookie> getCookies()
getCookies in interface UpgradeRequestpublic List<ExtensionConfig> getExtensions()
getExtensions in interface UpgradeRequestpublic String getHeader(String name)
getHeader in interface UpgradeRequestpublic int getHeaderInt(String name)
getHeaderInt in interface UpgradeRequestpublic Map<String,List<String>> getHeaders()
getHeaders in interface UpgradeRequestpublic List<String> getHeaders(String name)
getHeaders in interface UpgradeRequestpublic String getHost()
getHost in interface UpgradeRequestpublic 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 getHttpVersion()
getHttpVersion in interface UpgradeRequestpublic String getLocalAddress()
ServletRequest.getLocalAddr()public Locale getLocale()
ServletRequest.getLocale()Locale for the clientpublic Enumeration<Locale> getLocales()
ServletRequest.getLocales()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 String getMethod()
getMethod in interface UpgradeRequestpublic String getOrigin()
getOrigin in interface UpgradeRequestpublic Map<String,List<String>> getParameterMap()
getParameterMap in interface UpgradeRequest@Deprecated public Principal getPrincipal()
getUserPrincipal() insteadpublic String getProtocolVersion()
getProtocolVersion in interface UpgradeRequestpublic String getQueryString()
getQueryString in interface UpgradeRequestpublic 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 String getRequestPath()
public URI getRequestURI()
getRequestURI in interface UpgradeRequestpublic HttpSession getSession()
Note: this is equivalent to HttpServletRequest.getSession(boolean)
and will not create a new HttpSession.
getSession in interface UpgradeRequestpublic List<String> getSubProtocols()
getSubProtocols in interface UpgradeRequestpublic Principal getUserPrincipal()
HttpServletRequest.getUserPrincipal()getUserPrincipal in interface UpgradeRequestpublic boolean hasSubProtocol(String test)
hasSubProtocol in interface UpgradeRequestpublic boolean isOrigin(String test)
isOrigin in interface UpgradeRequestpublic boolean isSecure()
isSecure in interface UpgradeRequestpublic boolean isUserInRole(String role)
public void setCookies(List<HttpCookie> cookies)
setCookies in interface UpgradeRequestpublic void setExtensions(List<ExtensionConfig> configs)
setExtensions in interface UpgradeRequestpublic void setHeader(String name, List<String> values)
setHeader in interface UpgradeRequestpublic void setHeader(String name, String value)
setHeader in interface UpgradeRequestpublic void setHeaders(Map<String,List<String>> headers)
setHeaders in interface UpgradeRequestpublic void setHttpVersion(String httpVersion)
setHttpVersion in interface UpgradeRequestpublic void setMethod(String method)
setMethod in interface UpgradeRequestpublic void setRequestURI(URI uri)
setRequestURI in interface UpgradeRequestpublic void setSession(Object session)
setSession in interface UpgradeRequestpublic void setSubProtocols(List<String> subProtocols)
setSubProtocols in interface UpgradeRequestpublic void setSubProtocols(String... protocols)
setSubProtocols in interface UpgradeRequestCopyright © 1995–2017 Webtide. All rights reserved.