HttpServletRequest
, ServletRequest
public class HttpServletRequestWrapper extends ServletRequestWrapper implements HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
Constructor | Description |
---|---|
HttpServletRequestWrapper(HttpServletRequest request) |
Constructor.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
authenticate(HttpServletResponse response) |
Authenticate the request.
|
String |
changeSessionId() |
Change the session id.
|
String |
getAuthType() |
Get the auth type.
|
String |
getContextPath() |
Get the context path.
|
Cookie[] |
getCookies() |
Get the cookies.
|
long |
getDateHeader(String name) |
Get the date header.
|
String |
getHeader(String name) |
Get the header.
|
Enumeration<String> |
getHeaderNames() |
Get the header names.
|
Enumeration<String> |
getHeaders(String name) |
Get the headers.
|
int |
getIntHeader(String name) |
Get the int header.
|
String |
getMethod() |
Get the method.
|
Part |
getPart(String name) |
Get the part.
|
Collection<Part> |
getParts() |
Get the parts.
|
String |
getPathInfo() |
Get the path info.
|
String |
getPathTranslated() |
Get the path translated.
|
String |
getQueryString() |
Get the query string.
|
String |
getRemoteUser() |
Get the remote user.
|
String |
getRequestedSessionId() |
Get the requested session id.
|
String |
getRequestURI() |
Get the request URI.
|
StringBuffer |
getRequestURL() |
Get the request URL.
|
String |
getServletPath() |
Get the servlet path.
|
HttpSession |
getSession() |
Get the HTTP session.
|
HttpSession |
getSession(boolean create) |
Get the HTTP session.
|
Principal |
getUserPrincipal() |
Get the user principal.
|
boolean |
isRequestedSessionIdFromCookie() |
Is the requested session id from a cookie.
|
boolean |
isRequestedSessionIdFromUrl() |
Deprecated.
|
boolean |
isRequestedSessionIdFromURL() |
Is the requested session id from a URL.
|
boolean |
isRequestedSessionIdValid() |
Is the requested session id valid.
|
boolean |
isUserInRole(String role) |
Is the user in the role.
|
void |
login(String username,
String password) |
Login.
|
void |
logout() |
Logout.
|
<T extends HttpUpgradeHandler> |
upgrade(Class<T> handlerClass) |
Upgrade the request.
|
getHttpServletMapping, getTrailerFields, isTrailerFieldsReady, newPushBuilder
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, removeAttribute, setAttribute, setCharacterEncoding, startAsync, startAsync
getAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, isWrapperFor, isWrapperFor, removeAttribute, setAttribute, setCharacterEncoding, setRequest, startAsync, startAsync
public HttpServletRequestWrapper(HttpServletRequest request)
request
- the wrapped request.public boolean authenticate(HttpServletResponse response) throws IOException, ServletException
authenticate
in interface HttpServletRequest
response
- the response.IOException
- when an I/O error occurs.ServletException
- when a Servlet error occurs.public String changeSessionId()
changeSessionId
in interface HttpServletRequest
public String getAuthType()
getAuthType
in interface HttpServletRequest
public String getContextPath()
getContextPath
in interface HttpServletRequest
public Cookie[] getCookies()
getCookies
in interface HttpServletRequest
public long getDateHeader(String name)
getDateHeader
in interface HttpServletRequest
name
- the name.public String getHeader(String name)
getHeader
in interface HttpServletRequest
name
- the name.public Enumeration<String> getHeaderNames()
getHeaderNames
in interface HttpServletRequest
public Enumeration<String> getHeaders(String name)
getHeaders
in interface HttpServletRequest
name
- the name.public int getIntHeader(String name)
getIntHeader
in interface HttpServletRequest
name
- the name.public String getMethod()
getMethod
in interface HttpServletRequest
public Part getPart(String name) throws IOException, ServletException
getPart
in interface HttpServletRequest
name
- the name.IOException
- when an I/O error occurs.ServletException
- when a Servlet error occurs.public Collection<Part> getParts() throws IOException, ServletException
getParts
in interface HttpServletRequest
IOException
- when an I/O error occurs.ServletException
- when a Servlet error occurs.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 String getRequestURI()
getRequestURI
in interface HttpServletRequest
public StringBuffer getRequestURL()
getRequestURL
in interface HttpServletRequest
public String getRequestedSessionId()
getRequestedSessionId
in interface HttpServletRequest
public String getServletPath()
getServletPath
in interface HttpServletRequest
public HttpSession getSession()
getSession
in interface HttpServletRequest
public HttpSession getSession(boolean create)
getSession
in interface HttpServletRequest
create
- the create flag.public Principal getUserPrincipal()
getUserPrincipal
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 boolean isRequestedSessionIdValid()
isRequestedSessionIdValid
in interface HttpServletRequest
public boolean isUserInRole(String role)
isUserInRole
in interface HttpServletRequest
role
- the role.public void login(String username, String password) throws ServletException
login
in interface HttpServletRequest
username
- the username.password
- the password.ServletException
- when a Servlet error occurs.public void logout() throws ServletException
logout
in interface HttpServletRequest
ServletException
- when a Servlet error occurs.public <T extends HttpUpgradeHandler> T upgrade(Class<T> handlerClass) throws IOException, ServletException
upgrade
in interface HttpServletRequest
T
- the type of HTTP upgrade handler class.handlerClass
- the handler class.IOException
- when an I/O error occurs.ServletException
- when a Servlet error occurs.Copyright © 2020 Piranha Cloud. All rights reserved.