java.lang.Object
jakarta.servlet.ServletRequestWrapper
jakarta.servlet.http.HttpServletRequestWrapper
cloud.piranha.webapp.impl.AsyncHttpDispatchWrapper
- All Implemented Interfaces:
WebApplicationRequest
,HttpServletRequest
,ServletRequest
public class AsyncHttpDispatchWrapper
extends HttpServletRequestWrapper
implements WebApplicationRequest
The async HTTP dispatch wrapper.
- Author:
- Manfred Riem ([email protected])
-
Field Summary
Fields inherited from interface jakarta.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetAttribute(String name)
Get the attribute.Returns the attribute names.Get the dispatcher type.Returns the multipartConfig.getParameter(String name)
Get the parameter.Returns the parameter map.Returns the parameter names.String[]
getParameterValues(String name)
Returns the parameter values.Returns the path info.Returns the query string.Returns the wrapped request.Returns the request URI.Returns the request URI with query string.Returns the servlet path.Returns the wrapper attributes.Returns the wrapper parameters.boolean
Is async started.void
removeAttribute(String name)
Remove the attribute.void
setAsWrapperAttribute(String name, Object value)
Set as a wrapper attribute.void
setAttribute(String name, Object object)
Set the attribute.void
setContextPath(String contextPath)
Set the context path.void
setDispatcherType(DispatcherType dispatcherType)
Set the dispatcher type.void
setPathInfo(String pathInfo)
Set the path info.void
setQueryString(String queryString)
Set the query string.void
setRequestURI(String requestURI)
Set the request URI.void
setServletPath(String servletPath)
Set the servlet path.void
setWebApplication(WebApplication webApplication)
Set the web application.Start async processing.startAsync(ServletRequest servletRequest, ServletResponse servletResponse)
Start async processing.toString()
Methods inherited from class jakarta.servlet.http.HttpServletRequestWrapper
authenticate, changeSessionId, getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPart, getParts, getPathTranslated, getRemoteUser, getRequestedSessionId, getRequestURL, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole, login, logout, upgrade
Methods inherited from class jakarta.servlet.ServletRequestWrapper
getAsyncContext, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncSupported, isSecure, isWrapperFor, isWrapperFor, setCharacterEncoding, setRequest
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface jakarta.servlet.http.HttpServletRequest
authenticate, changeSessionId, getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getHttpServletMapping, getIntHeader, getMethod, getPart, getParts, getPathTranslated, getRemoteUser, getRequestedSessionId, getRequestURL, getSession, getSession, getTrailerFields, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isTrailerFieldsReady, isUserInRole, login, logout, newPushBuilder, upgrade
Methods inherited from interface jakarta.servlet.ServletRequest
getAsyncContext, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncSupported, isSecure, setCharacterEncoding
-
Constructor Details
-
AsyncHttpDispatchWrapper
Constructor.- Parameters:
request
- the HTTP servlet request.
-
-
Method Details
-
getRequest
Description copied from class:ServletRequestWrapper
Returns the wrapped request.- Overrides:
getRequest
in classServletRequestWrapper
- Returns:
- the wrapped request
-
getDispatcherType
Description copied from class:ServletRequestWrapper
Get the dispatcher type.- Specified by:
getDispatcherType
in interfaceServletRequest
- Overrides:
getDispatcherType
in classServletRequestWrapper
- Returns:
- the dispatcher type
-
getServletPath
Description copied from class:HttpServletRequestWrapper
Returns the servlet path.- Specified by:
getServletPath
in interfaceHttpServletRequest
- Overrides:
getServletPath
in classHttpServletRequestWrapper
- Returns:
- the servlet path
-
getPathInfo
Description copied from class:HttpServletRequestWrapper
Returns the path info.- Specified by:
getPathInfo
in interfaceHttpServletRequest
- Overrides:
getPathInfo
in classHttpServletRequestWrapper
- Returns:
- the path info
-
setPathInfo
Set the path info.- Parameters:
pathInfo
- the path info.
-
getRequestURI
Description copied from class:HttpServletRequestWrapper
Returns the request URI.- Specified by:
getRequestURI
in interfaceHttpServletRequest
- Overrides:
getRequestURI
in classHttpServletRequestWrapper
- Returns:
- the request URI
-
setRequestURI
Set the request URI.- Parameters:
requestURI
- the request URI.
-
getQueryString
Description copied from class:HttpServletRequestWrapper
Returns the query string.- Specified by:
getQueryString
in interfaceHttpServletRequest
- Overrides:
getQueryString
in classHttpServletRequestWrapper
- Returns:
- the query string
-
startAsync
Description copied from class:ServletRequestWrapper
Start async processing.- Specified by:
startAsync
in interfaceServletRequest
- Overrides:
startAsync
in classServletRequestWrapper
- Returns:
- the async context.
- Throws:
IllegalStateException
- when not allowed.
-
startAsync
public AsyncContext startAsync(ServletRequest servletRequest, ServletResponse servletResponse) throws IllegalStateExceptionDescription copied from class:ServletRequestWrapper
Start async processing.- Specified by:
startAsync
in interfaceServletRequest
- Overrides:
startAsync
in classServletRequestWrapper
- Parameters:
servletRequest
- the servlet request.servletResponse
- the servlet response.- Returns:
- the async context.
- Throws:
IllegalStateException
- when not able to start async processing.
-
isAsyncStarted
public boolean isAsyncStarted()Description copied from class:ServletRequestWrapper
Is async started.- Specified by:
isAsyncStarted
in interfaceServletRequest
- Overrides:
isAsyncStarted
in classServletRequestWrapper
- Returns:
- true if async started, false otherwise.
-
getAttributeNames
Description copied from class:ServletRequestWrapper
Returns the attribute names.- Specified by:
getAttributeNames
in interfaceServletRequest
- Overrides:
getAttributeNames
in classServletRequestWrapper
- Returns:
- the attribute names
-
getAttribute
Description copied from class:ServletRequestWrapper
Get the attribute.- Specified by:
getAttribute
in interfaceServletRequest
- Overrides:
getAttribute
in classServletRequestWrapper
- Parameters:
name
- the name.- Returns:
- the value.
-
setAttribute
Description copied from class:ServletRequestWrapper
Set the attribute.- Specified by:
setAttribute
in interfaceServletRequest
- Overrides:
setAttribute
in classServletRequestWrapper
- Parameters:
name
- the name.object
- the object value.
-
removeAttribute
Description copied from class:ServletRequestWrapper
Remove the attribute.- Specified by:
removeAttribute
in interfaceServletRequest
- Overrides:
removeAttribute
in classServletRequestWrapper
- Parameters:
name
- the name.
-
getParameter
Get the parameter.- Specified by:
getParameter
in interfaceServletRequest
- Overrides:
getParameter
in classServletRequestWrapper
- Parameters:
name
- the name.- Returns:
- the value.
-
getParameterMap
Returns the parameter map.- Specified by:
getParameterMap
in interfaceServletRequest
- Overrides:
getParameterMap
in classServletRequestWrapper
- Returns:
- the parameter map
-
getParameterNames
Returns the parameter names.- Specified by:
getParameterNames
in interfaceServletRequest
- Overrides:
getParameterNames
in classServletRequestWrapper
- Returns:
- the parameter names
-
getParameterValues
Returns the parameter values.- Specified by:
getParameterValues
in interfaceServletRequest
- Overrides:
getParameterValues
in classServletRequestWrapper
- Parameters:
name
- the parameter name.- Returns:
- the parameter values
-
setQueryString
Set the query string.- Parameters:
queryString
- the query string.
-
setAsWrapperAttribute
Set as a wrapper attribute.- Parameters:
name
- the name.value
- the value.
-
getWrapperAttributes
Returns the wrapper attributes.- Returns:
- the wrapper attributes
-
getWrapperParameters
Returns the wrapper parameters.- Returns:
- the wrapper parameters
-
setDispatcherType
Description copied from interface:WebApplicationRequest
Set the dispatcher type.- Specified by:
setDispatcherType
in interfaceWebApplicationRequest
- Parameters:
dispatcherType
- the dispatcher type.
-
toString
-
getRequestURIWithQueryString
Returns the request URI with query string.- Returns:
- the request URI with query string
-
setContextPath
Description copied from interface:WebApplicationRequest
Set the context path.- Specified by:
setContextPath
in interfaceWebApplicationRequest
- Parameters:
contextPath
- the context path.
-
setServletPath
Description copied from interface:WebApplicationRequest
Set the servlet path.- Specified by:
setServletPath
in interfaceWebApplicationRequest
- Parameters:
servletPath
- the servlet path.
-
setWebApplication
Description copied from interface:WebApplicationRequest
Set the web application.- Specified by:
setWebApplication
in interfaceWebApplicationRequest
- Parameters:
webApplication
- the web application.
-
getMultipartConfig
Description copied from interface:WebApplicationRequest
Returns the multipartConfig.- Specified by:
getMultipartConfig
in interfaceWebApplicationRequest
- Returns:
- the multipartConfig
-