ServletRequest
WebApplicationRequest
, WebApplicationServerRequest
DefaultWebApplicationRequest
, DefaultWebApplicationServerRequest
, EmbeddedRequest
, HttpServletRequestWrapper
, NanoRequest
, RealtimeHttpServletRequestWrapper
, WeldHttpServletRequest
public interface HttpServletRequest extends ServletRequest
Modifier and Type | Field | Description |
---|---|---|
static String |
BASIC_AUTH |
Defines the BASIC_AUTH constant.
|
static String |
CLIENT_CERT_AUTH |
Defines the CLIENT_CERT constant.
|
static String |
DIGEST_AUTH |
Defines the DIGEST constant.
|
static String |
FORM_AUTH |
Defines the FORM constant.
|
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.
|
default HttpServletMapping |
getHttpServletMapping() |
Get the HTTP servlet mapping.
|
int |
getIntHeader(String name) |
Get the int header.
|
String |
getMethod() |
Get the HTTP 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.
|
default Map<String,String> |
getTrailerFields() |
Get the trailer fields.
|
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.
|
default boolean |
isTrailerFieldsReady() |
Is trailer fields ready.
|
boolean |
isUserInRole(String role) |
Is the user in the specified role.
|
void |
login(String username,
String password) |
Login.
|
void |
logout() |
Logout.
|
default PushBuilder |
newPushBuilder() |
Create a new push builder.
|
<T extends HttpUpgradeHandler> |
upgrade(Class<T> handlerClass) |
Upgrade the request.
|
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
static final String BASIC_AUTH
static final String CLIENT_CERT_AUTH
static final String DIGEST_AUTH
static final String FORM_AUTH
boolean authenticate(HttpServletResponse response) throws IOException, ServletException
response
- the response.IOException
- when an I/O error occurs.ServletException
- when a Servlet error occurs.String changeSessionId()
String getAuthType()
String getContextPath()
Cookie[] getCookies()
long getDateHeader(String name)
name
- the name.String getHeader(String name)
name
- the name.Enumeration<String> getHeaders(String name)
name
- the name.Enumeration<String> getHeaderNames()
default HttpServletMapping getHttpServletMapping()
int getIntHeader(String name)
name
- the name.String getMethod()
Part getPart(String name) throws IOException, ServletException
name
- the name.IOException
- when an I/O error occurs.ServletException
- when a Servlet error occurs.Collection<Part> getParts() throws IOException, ServletException
IOException
- when an I/O error occurs.ServletException
- when a Servlet error occurs.String getPathInfo()
String getPathTranslated()
String getQueryString()
String getRemoteUser()
String getRequestURI()
StringBuffer getRequestURL()
String getRequestedSessionId()
String getServletPath()
HttpSession getSession(boolean create)
create
- the create flag.HttpSession getSession()
default Map<String,String> getTrailerFields()
Principal getUserPrincipal()
boolean isRequestedSessionIdFromCookie()
boolean isRequestedSessionIdFromURL()
@Deprecated boolean isRequestedSessionIdFromUrl()
boolean isRequestedSessionIdValid()
default boolean isTrailerFieldsReady()
boolean isUserInRole(String role)
role
- the role.void login(String username, String password) throws ServletException
username
- the username.password
- the password.ServletException
- when a Servlet error occurs.void logout() throws ServletException
ServletException
- when a Servlet error occurs.default PushBuilder newPushBuilder()
<T extends HttpUpgradeHandler> T upgrade(Class<T> handlerClass) throws IOException, ServletException
T
- the type of HTTP upgrade handler.handlerClass
- the handler class.IOException
- when an I/O error occurs.ServletException
- when a Servlet error occurs.Copyright © 2020 Piranha Cloud. All rights reserved.