public class MutableHttpServletRequest extends Object implements HttpServletRequest
Modifier and Type | Field and Description |
---|---|
Map<String,Object> |
attributeMap |
static String |
copyright |
Map<String,org.apache.commons.fileupload.FileItem[]> |
fileItemMap |
Map<String,String[]> |
headerMap |
List<Locale> |
locales |
Map<String,String[]> |
parameterMap |
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
Constructor and Description |
---|
MutableHttpServletRequest() |
MutableHttpServletRequest(MockServletContext servletContext) |
public static final String copyright
public MutableHttpServletRequest()
public MutableHttpServletRequest(MockServletContext servletContext)
public void addFileItem(String name, org.apache.commons.fileupload.FileItem item)
public org.apache.commons.fileupload.FileItem getFileItem(String name)
public void setFileItem(String key, org.apache.commons.fileupload.FileItem value)
public void setMethod(String method)
public void setContextPath(String context)
public void setServletPath(String servletPath)
public void makeMultipart()
public void setScheme(String scheme)
public void setServerName(String serverName)
public void setServerPort(int serverPort)
public String getParameter(String name)
getParameter
in interface ServletRequest
public Enumeration getParameterNames()
getParameterNames
in interface ServletRequest
public String[] getParameterValues(String name)
getParameterValues
in interface ServletRequest
public Map getParameterMap()
getParameterMap
in interface ServletRequest
public String getMethod()
getMethod
in interface HttpServletRequest
public String getContextPath()
getContextPath
in interface HttpServletRequest
public String getServletPath()
getServletPath
in interface HttpServletRequest
public Object getAttribute(String s)
getAttribute
in interface ServletRequest
public void setAttribute(String s, Object o)
setAttribute
in interface ServletRequest
public void removeAttribute(String s)
removeAttribute
in interface ServletRequest
public String getAuthType()
getAuthType
in interface HttpServletRequest
public Cookie[] getCookies()
getCookies
in interface HttpServletRequest
public long getDateHeader(String s)
getDateHeader
in interface HttpServletRequest
public String getHeader(String s)
getHeader
in interface HttpServletRequest
public Enumeration<String> getHeaders(String s)
getHeaders
in interface HttpServletRequest
public Enumeration<String> getHeaderNames()
getHeaderNames
in interface HttpServletRequest
public int getIntHeader(String s)
getIntHeader
in interface HttpServletRequest
public String getPathInfo()
getPathInfo
in interface HttpServletRequest
public String getPathTranslated()
getPathTranslated
in interface HttpServletRequest
public String getQueryString()
getQueryString
in interface HttpServletRequest
public String getRemoteUser()
getRemoteUser
in interface HttpServletRequest
public boolean isUserInRole(String s)
isUserInRole
in interface HttpServletRequest
public Principal getUserPrincipal()
getUserPrincipal
in interface HttpServletRequest
public String getRequestedSessionId()
getRequestedSessionId
in interface HttpServletRequest
public String getRequestURI()
getRequestURI
in interface HttpServletRequest
public void setRequestURI(String requestURI)
public StringBuffer getRequestURL()
getRequestURL
in interface HttpServletRequest
public HttpSession getSession(boolean create)
getSession
in interface HttpServletRequest
public HttpSession getSession()
getSession
in interface HttpServletRequest
public String changeSessionId()
public boolean isRequestedSessionIdValid()
isRequestedSessionIdValid
in interface HttpServletRequest
public boolean isRequestedSessionIdFromCookie()
isRequestedSessionIdFromCookie
in interface HttpServletRequest
public boolean isRequestedSessionIdFromURL()
isRequestedSessionIdFromURL
in interface HttpServletRequest
@Deprecated public boolean isRequestedSessionIdFromUrl()
isRequestedSessionIdFromUrl
in interface HttpServletRequest
public Enumeration getAttributeNames()
getAttributeNames
in interface ServletRequest
public String getCharacterEncoding()
getCharacterEncoding
in interface ServletRequest
public void setCharacterEncoding(String s) throws UnsupportedEncodingException
setCharacterEncoding
in interface ServletRequest
UnsupportedEncodingException
public int getContentLength()
getContentLength
in interface ServletRequest
public long getContentLengthLong()
public String getContentType()
getContentType
in interface ServletRequest
public void setContentType(String contentType)
public ServletInputStream getInputStream() throws IOException
getInputStream
in interface ServletRequest
IOException
public String getProtocol()
getProtocol
in interface ServletRequest
public String getScheme()
getScheme
in interface ServletRequest
public String getServerName()
getServerName
in interface ServletRequest
public int getServerPort()
getServerPort
in interface ServletRequest
public BufferedReader getReader() throws IOException
getReader
in interface ServletRequest
IOException
public String getRemoteAddr()
getRemoteAddr
in interface ServletRequest
public String getRemoteHost()
getRemoteHost
in interface ServletRequest
public Locale getLocale()
getLocale
in interface ServletRequest
public Enumeration<Locale> getLocales()
getLocales
in interface ServletRequest
public boolean isSecure()
isSecure
in interface ServletRequest
public RequestDispatcher getRequestDispatcher(String s)
getRequestDispatcher
in interface ServletRequest
@Deprecated public String getRealPath(String s)
getRealPath
in interface ServletRequest
public int getRemotePort()
getRemotePort
in interface ServletRequest
public String getLocalName()
getLocalName
in interface ServletRequest
public String getLocalAddr()
getLocalAddr
in interface ServletRequest
public int getLocalPort()
getLocalPort
in interface ServletRequest
public boolean authenticate(HttpServletResponse response) throws IOException, ServletException
authenticate
in interface HttpServletRequest
IOException
ServletException
public void login(String s, String s1) throws ServletException
login
in interface HttpServletRequest
ServletException
public void logout() throws ServletException
logout
in interface HttpServletRequest
ServletException
public Collection<Part> getParts() throws IOException, ServletException
getParts
in interface HttpServletRequest
IOException
ServletException
public Part getPart(String s) throws IOException, ServletException
getPart
in interface HttpServletRequest
IOException
ServletException
public ServletContext getServletContext()
getServletContext
in interface ServletRequest
public AsyncContext startAsync() throws IllegalStateException
startAsync
in interface ServletRequest
IllegalStateException
public AsyncContext startAsync(ServletRequest request, ServletResponse response) throws IllegalStateException
startAsync
in interface ServletRequest
IllegalStateException
public boolean isAsyncStarted()
isAsyncStarted
in interface ServletRequest
public boolean isAsyncSupported()
isAsyncSupported
in interface ServletRequest
public AsyncContext getAsyncContext()
getAsyncContext
in interface ServletRequest
public DispatcherType getDispatcherType()
getDispatcherType
in interface ServletRequest