public class HttpServletRequestImpl extends Object implements javax.servlet.http.HttpServletRequest, Holders.RequestHolder
Request request object.
All methods are delegated to the wrapped request.| Modifier and Type | Field and Description |
|---|---|
protected Request |
request
The wrapped request.
|
protected HttpServletResponseImpl |
servletResponse
The corresponding servlet response
|
protected boolean |
usingInputStream
Using stream flag.
|
protected boolean |
usingReader
Using writer flag.
|
| Modifier | Constructor and Description |
|---|---|
protected |
HttpServletRequestImpl()
Construct a wrapper for the specified request.
|
protected Request request
protected HttpServletResponseImpl servletResponse
protected boolean usingInputStream
protected boolean usingReader
protected HttpServletRequestImpl()
public static HttpServletRequestImpl create()
public void initialize(Request request, HttpServletResponseImpl servletResponse, WebappContext context) throws IOException
IOExceptionprotected Object clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionpublic Object getAttribute(String name)
getAttribute in interface javax.servlet.ServletRequestpublic Enumeration<String> getAttributeNames()
getAttributeNames in interface javax.servlet.ServletRequestpublic String getCharacterEncoding()
getCharacterEncoding in interface javax.servlet.ServletRequestpublic void setCharacterEncoding(String env) throws UnsupportedEncodingException
setCharacterEncoding in interface javax.servlet.ServletRequestUnsupportedEncodingExceptionpublic int getContentLength()
getContentLength in interface javax.servlet.ServletRequestpublic long getContentLengthLong()
getContentLengthLong in interface javax.servlet.ServletRequestpublic String getContentType()
getContentType in interface javax.servlet.ServletRequestpublic javax.servlet.ServletInputStream getInputStream()
throws IOException
getInputStream in interface javax.servlet.ServletRequestIOExceptionpublic String getParameter(String name)
getParameter in interface javax.servlet.ServletRequestpublic Enumeration<String> getParameterNames()
getParameterNames in interface javax.servlet.ServletRequestpublic String[] getParameterValues(String name)
getParameterValues in interface javax.servlet.ServletRequestpublic Map<String,String[]> getParameterMap()
getParameterMap in interface javax.servlet.ServletRequestpublic String getProtocol()
getProtocol in interface javax.servlet.ServletRequestpublic String getScheme()
getScheme in interface javax.servlet.ServletRequestpublic String getServerName()
getServerName in interface javax.servlet.ServletRequestpublic int getServerPort()
getServerPort in interface javax.servlet.ServletRequestpublic BufferedReader getReader() throws IOException
getReader in interface javax.servlet.ServletRequestIOExceptionpublic String getRemoteAddr()
getRemoteAddr in interface javax.servlet.ServletRequestpublic String getRemoteHost()
getRemoteHost in interface javax.servlet.ServletRequestpublic void setAttribute(String name, Object value)
setAttribute in interface javax.servlet.ServletRequestpublic void removeAttribute(String name)
removeAttribute in interface javax.servlet.ServletRequestpublic Locale getLocale()
getLocale in interface javax.servlet.ServletRequestpublic Enumeration<Locale> getLocales()
getLocales in interface javax.servlet.ServletRequestpublic boolean isSecure()
isSecure in interface javax.servlet.ServletRequestpublic javax.servlet.RequestDispatcher getRequestDispatcher(String path)
getRequestDispatcher in interface javax.servlet.ServletRequestpublic String getRealPath(String path)
getRealPath in interface javax.servlet.ServletRequestpublic String getAuthType()
getAuthType in interface javax.servlet.http.HttpServletRequestpublic Cookie[] getGrizzlyCookies()
public long getDateHeader(String name)
getDateHeader in interface javax.servlet.http.HttpServletRequestpublic String getHeader(String name)
getHeader in interface javax.servlet.http.HttpServletRequestpublic Enumeration<String> getHeaders(String name)
getHeaders in interface javax.servlet.http.HttpServletRequestpublic Enumeration<String> getHeaderNames()
getHeaderNames in interface javax.servlet.http.HttpServletRequestpublic int getIntHeader(String name)
getIntHeader in interface javax.servlet.http.HttpServletRequestpublic String getMethod()
getMethod in interface javax.servlet.http.HttpServletRequestpublic String getPathInfo()
getPathInfo in interface javax.servlet.http.HttpServletRequestpublic String getPathTranslated()
getPathTranslated in interface javax.servlet.http.HttpServletRequestpublic String getContextPath()
getContextPath in interface javax.servlet.http.HttpServletRequestprotected void setContextPath(String contextPath)
public String getQueryString()
getQueryString in interface javax.servlet.http.HttpServletRequestpublic String getRemoteUser()
getRemoteUser in interface javax.servlet.http.HttpServletRequestpublic boolean isUserInRole(String role)
isUserInRole in interface javax.servlet.http.HttpServletRequestpublic Principal getUserPrincipal()
getUserPrincipal in interface javax.servlet.http.HttpServletRequestpublic String getRequestedSessionId()
getRequestedSessionId in interface javax.servlet.http.HttpServletRequestpublic String getRequestURI()
getRequestURI in interface javax.servlet.http.HttpServletRequestpublic StringBuffer getRequestURL()
getRequestURL in interface javax.servlet.http.HttpServletRequestpublic String getServletPath()
getServletPath in interface javax.servlet.http.HttpServletRequestpublic javax.servlet.http.HttpSession getSession(boolean create)
getSession in interface javax.servlet.http.HttpServletRequestpublic javax.servlet.http.HttpSession getSession()
getSession in interface javax.servlet.http.HttpServletRequestpublic String changeSessionId()
changeSessionId in interface javax.servlet.http.HttpServletRequestpublic boolean isRequestedSessionIdValid()
isRequestedSessionIdValid in interface javax.servlet.http.HttpServletRequestpublic boolean isRequestedSessionIdFromCookie()
isRequestedSessionIdFromCookie in interface javax.servlet.http.HttpServletRequestpublic boolean isRequestedSessionIdFromURL()
isRequestedSessionIdFromURL in interface javax.servlet.http.HttpServletRequestpublic boolean isRequestedSessionIdFromUrl()
isRequestedSessionIdFromUrl in interface javax.servlet.http.HttpServletRequestpublic javax.servlet.http.Cookie[] getCookies()
getCookies in interface javax.servlet.http.HttpServletRequestpublic int getRemotePort()
getRemotePort in interface javax.servlet.ServletRequestpublic String getLocalName()
getLocalName in interface javax.servlet.ServletRequestpublic String getLocalAddr()
getLocalAddr in interface javax.servlet.ServletRequestpublic int getLocalPort()
getLocalPort in interface javax.servlet.ServletRequestprotected WebappContext getContextImpl()
WebappContextWebappContextprotected void setContextImpl(WebappContext contextImpl)
WebappContextcontextImpl - the underlying WebappContextpublic void setServletPath(String servletPath)
servletPath - Servlet path to set.protected void setPathInfo(String pathInfo)
public Request getRequest()
public javax.servlet.ServletContext getServletContext()
getServletContext in interface javax.servlet.ServletRequestpublic Request getInternalRequest()
Request associated with this Holder.getInternalRequest in interface Holders.RequestHolderpublic javax.servlet.DispatcherType getDispatcherType()
getDispatcherType in interface javax.servlet.ServletRequestpublic javax.servlet.AsyncContext startAsync()
throws IllegalStateException
startAsync in interface javax.servlet.ServletRequestIllegalStateExceptionpublic javax.servlet.AsyncContext startAsync(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse)
throws IllegalStateException
startAsync in interface javax.servlet.ServletRequestIllegalStateExceptionpublic boolean isAsyncStarted()
isAsyncStarted in interface javax.servlet.ServletRequestpublic void disableAsyncSupport()
public boolean isAsyncSupported()
isAsyncSupported in interface javax.servlet.ServletRequestpublic javax.servlet.AsyncContext getAsyncContext()
getAsyncContext in interface javax.servlet.ServletRequestpublic <T extends javax.servlet.http.HttpUpgradeHandler> T upgrade(Class<T> handlerClass) throws IOException
HttpUpgradeHandler for an given
class and uses it for the http protocol upgrade processing.upgrade in interface javax.servlet.http.HttpServletRequesthandlerClass - The ProtocolHandler class used for the upgrade.HttpUpgradeHandlerIOException - if an I/O error occurred during the upgradeHttpUpgradeHandler,
WebConnectionpublic boolean isUpgrade()
public javax.servlet.http.HttpUpgradeHandler getHttpUpgradeHandler()
public boolean authenticate(javax.servlet.http.HttpServletResponse hsr)
throws IOException,
javax.servlet.ServletException
authenticate in interface javax.servlet.http.HttpServletRequestIOExceptionjavax.servlet.ServletExceptionpublic void login(String string, String string1) throws javax.servlet.ServletException
login in interface javax.servlet.http.HttpServletRequestjavax.servlet.ServletExceptionpublic void logout()
throws javax.servlet.ServletException
logout in interface javax.servlet.http.HttpServletRequestjavax.servlet.ServletExceptionpublic Collection<javax.servlet.http.Part> getParts() throws IOException, javax.servlet.ServletException
getParts in interface javax.servlet.http.HttpServletRequestIOExceptionjavax.servlet.ServletExceptionpublic javax.servlet.http.Part getPart(String string) throws IOException, javax.servlet.ServletException
getPart in interface javax.servlet.http.HttpServletRequestIOExceptionjavax.servlet.ServletExceptionCopyright © 2016 Oracle Corporation. All Rights Reserved.