Module cloud.piranha.webapp.impl
Package cloud.piranha.webapp.impl
Class DefaultWebApplicationRequest
java.lang.Object
java.io.InputStream
jakarta.servlet.ServletInputStream
cloud.piranha.webapp.impl.DefaultWebApplicationRequest
- All Implemented Interfaces:
WebApplicationRequest
,HttpServletRequest
,ServletRequest
,Closeable
,AutoCloseable
- Direct Known Subclasses:
EmbeddedRequest
,HttpWebApplicationRequest
,NanoRequest
public class DefaultWebApplicationRequest
extends ServletInputStream
implements WebApplicationRequest
The default WebApplicationRequest.
- Author:
- Manfred Riem ([email protected])
-
Field Summary
Modifier and TypeFieldDescriptionprotected AsyncContext
Stores the async context.protected boolean
Stores if async is started.protected boolean
Stores if async is supported.protected AttributeManager
Stores the attribute manager.protected String
Stores the auth type.protected String
Stores the character encoding.protected long
Stores the content length.protected String
Stores the content type.protected String
Stores the context path.protected Cookie[]
Stores the cookies.protected String
Stores the current session id.protected DispatcherType
Stores the dispatcher type.protected boolean
Stores the gotInputStream flag.protected boolean
Stores the gotReader flag.protected HttpHeaderManager
Stores the header manager.protected HttpServletMapping
Stores the httpServletMapping.protected InputStream
Stores the input stream.protected String
Stores the local address.protected String
Stores the local name.protected int
Stores the local port.protected String
Stores the method.protected MultipartConfigElement
Stores the multipartConfig.protected String
Stores the original servlet path.Stores the parameters.protected boolean
Stores the parameters parsed flag.protected String
Stores the path info.protected String
Stores the protocol.protected String
Stores the query string.protected BufferedReader
Stores the reader.protected String
Stores the remote address.protected String
Stores the remote host.protected int
Stores the remote port.protected String
Stores the requested session id.protected boolean
Stores the requested session id from cookie flag.protected boolean
Stores the requested session id from url flag.protected String
Stores the scheme.protected String
Stores the server name.protected int
Stores the server port.protected String
Stores the servlet path.protected boolean
Stores the upgraded flag.protected HttpUpgradeHandler
Stores the upgrade handler.protected Principal
Stores the user principal.protected WebApplication
Stores the web applicationFields inherited from interface jakarta.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
authenticate(HttpServletResponse response)
Authenticate.Change the session id.Returns the async context.getAttribute(String name)
Get the attribute.Get attribute names.Returns the auth type.Returns the character encoding.int
Returns the content length.long
Returns the content length.Returns the content type.Returns the context path.Cookie[]
Returns the cookies.long
getDateHeader(String name)
Returns the date header.Returns the dispatcher type.Get the header.Returns the header names.getHeaders(String name)
Get the headers.Returns the HTTP servlet mapping.Get the input stream.int
getIntHeader(String name)
Returns the int header.Returns the local address.Get locale.Returns the locales.Returns the local name.int
Returns the local port.Returns the HTTP method.Returns the multipartConfig.Gets the original Servlet PathgetParameter(String name)
Get the parameter.Returns the parameter map.Returns the parameter names.protected void
Get the parameters from the request.String[]
getParameterValues(String name)
Returns the parameter values.Get the part.getParts()
Get the parts.Returns the path info.Returns the translated path.Returns the protocol.Returns the query string.Get the reader.getRealPath(String path)
Deprecated.Returns the remote address.Returns the remote host.int
Returns the remote port.Returns the remote user.getRequestDispatcher(String path)
Returns the request dispatcher.Returns the requested session id.Returns the request URI.Returns the request URI with query string.Returns the request URL.Returns the scheme.Returns the server name.int
Returns the server port.Returns the servlet context.Returns the servlet path.Returns the session.getSession(boolean create)
Get the HTTP session.Returns the upgrade handler.Returns the user principal.boolean
Is async started.boolean
Is async supported.boolean
Is the Servlet input stream finished?boolean
isReady()
Is the Servlet input stream ready?boolean
Is the requested session id from cookie.boolean
Deprecated.boolean
Is the requested session id from the request url.boolean
Is the requested session id valid?boolean
isSecure()
Is the request secure.boolean
Is the request upgraded.boolean
isUserInRole(String role)
Is the user in the specified role.void
Login.void
logout()
Logout.int
read()
Read from the Servlet input stream.void
removeAttribute(String name)
Remove the attribute.void
setAsyncStarted(boolean asyncStarted)
Set the async started flag.void
setAsyncSupported(boolean asyncSupported)
Set the async supported flag.void
setAttribute(String name, Object value)
Set the attribute.void
setAuthType(String authType)
Set the auth type.void
setCharacterEncoding(String characterEncoding)
Set the character encoding.void
setContentLength(int contentLength)
Set the content length.void
setContentType(String contentType)
Set the content type.void
setContextPath(String contextPath)
Set the context path.void
setCookies(Cookie[] cookies)
Set the cookies.void
setDispatcherType(DispatcherType dispatcherType)
Set the dispatcher type.void
Set the header.void
setHttpServletMapping(HttpServletMapping httpServletMapping)
void
setInputStream(InputStream inputStream)
Set the input stream.void
setLocalAddr(String localAddress)
Set the local address.void
setLocalName(String localName)
Set the local name.void
setLocalPort(int localPort)
Set the local port.void
Set the method.void
setMultipartConfig(MultipartConfigElement multipartConfig)
void
setOriginalServletPath(String originalServletPath)
Set the original Servlet Pathvoid
setParameter(String name, String[] values)
Set the parameter values.void
setPathInfo(String pathInfo)
Set the path info.void
setProtocol(String protocol)
Set the protocol.void
setQueryString(String queryString)
Set the query string.void
setReadListener(ReadListener listener)
Set the read listener.void
setRemoteAddr(String remoteAddr)
Set the remote address.void
setRemoteHost(String remoteHost)
Set the remote host.void
setRemotePort(int remotePort)
Set the remote port.void
setRequestedSessionId(String requestedSessionId)
Set the requested session id.void
setRequestedSessionIdFromCookie(boolean requestedSessionIdFromCookie)
Set the requested session id from cookie.void
setRequestedSessionIdFromURL(boolean requestedSessionIdFromURL)
Set the request session id from URL flag.void
Set the scheme.void
setServerName(String serverName)
Set the server name.void
setServerPort(int serverPort)
Set the server port.void
setServletPath(String servletPath)
Set the servlet path.void
setUpgraded(boolean upgraded)
Set the upgraded flag.void
setUserPrincipal(Principal userPrincipal)
Set the user principal.void
setWebApplication(WebApplication webApplication)
Set the web application.Start async.startAsync(ServletRequest request, ServletResponse response)
Start async.toString()
static <T> T
unwrap(ServletRequest request, Class<T> type)
Unwrap the request.<T extends HttpUpgradeHandler>
TUpgrade the request.protected void
Verify the method is of type "multipart/form-data"Methods inherited from class jakarta.servlet.ServletInputStream
readLine
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
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
getTrailerFields, isTrailerFieldsReady, newPushBuilder
-
Field Details
-
authType
Stores the auth type. -
asyncContext
Stores the async context. -
asyncStarted
protected boolean asyncStartedStores if async is started. -
asyncSupported
protected boolean asyncSupportedStores if async is supported. -
attributeManager
Stores the attribute manager. -
characterEncoding
Stores the character encoding. -
contentLength
protected long contentLengthStores the content length. -
contentType
Stores the content type. -
contextPath
Stores the context path. -
cookies
Stores the cookies. -
currentSessionId
Stores the current session id. -
dispatcherType
Stores the dispatcher type. -
gotInputStream
protected boolean gotInputStreamStores the gotInputStream flag. -
gotReader
protected boolean gotReaderStores the gotReader flag. -
headerManager
Stores the header manager. -
httpServletMapping
Stores the httpServletMapping. -
inputStream
Stores the input stream. -
localAddress
Stores the local address. -
localName
Stores the local name. -
localPort
protected int localPortStores the local port. -
method
Stores the method. -
multipartConfig
Stores the multipartConfig. -
parameters
Stores the parameters. -
parametersParsed
protected boolean parametersParsedStores the parameters parsed flag. -
pathInfo
Stores the path info. -
protocol
Stores the protocol. -
queryString
Stores the query string. -
reader
Stores the reader. -
remoteAddr
Stores the remote address. -
remoteHost
Stores the remote host. -
remotePort
protected int remotePortStores the remote port. -
requestedSessionId
Stores the requested session id. -
requestedSessionIdFromCookie
protected boolean requestedSessionIdFromCookieStores the requested session id from cookie flag. -
requestedSessionIdFromURL
protected boolean requestedSessionIdFromURLStores the requested session id from url flag. -
scheme
Stores the scheme. -
serverName
Stores the server name. -
serverPort
protected int serverPortStores the server port. -
servletPath
Stores the servlet path. -
originalServletPath
Stores the original servlet path. -
upgraded
protected boolean upgradedStores the upgraded flag. -
upgradeHandler
Stores the upgrade handler. -
userPrincipal
Stores the user principal. -
webApplication
Stores the web application
-
-
Constructor Details
-
DefaultWebApplicationRequest
public DefaultWebApplicationRequest()Constructor.
-
-
Method Details
-
authenticate
Authenticate.- Specified by:
authenticate
in interfaceHttpServletRequest
- Parameters:
response
- the HTTP servlet response.- Returns:
- true if authenticated, false otherwise.
- Throws:
IOException
- when an I/O error occurs.ServletException
- when a Servlet error occurs.
-
changeSessionId
Change the session id.- Specified by:
changeSessionId
in interfaceHttpServletRequest
- Returns:
- the changed session id.
-
getAsyncContext
Returns the async context.- Specified by:
getAsyncContext
in interfaceServletRequest
- Returns:
- the async context
-
getAttribute
Get the attribute.- Specified by:
getAttribute
in interfaceServletRequest
- Parameters:
name
- the attribute name.- Returns:
- the value.
-
getAttributeNames
Get attribute names.- Specified by:
getAttributeNames
in interfaceServletRequest
- Returns:
- the attribute names.
-
getAuthType
Returns the auth type.- Specified by:
getAuthType
in interfaceHttpServletRequest
- Returns:
- the auth type
-
getCharacterEncoding
Returns the character encoding.- Specified by:
getCharacterEncoding
in interfaceServletRequest
- Returns:
- the character encoding
-
getContentLength
public int getContentLength()Returns the content length.- Specified by:
getContentLength
in interfaceServletRequest
- Returns:
- the content length
-
getContentLengthLong
public long getContentLengthLong()Returns the content length.- Specified by:
getContentLengthLong
in interfaceServletRequest
- Returns:
- the content length
-
getContentType
Returns the content type.- Specified by:
getContentType
in interfaceServletRequest
- Returns:
- the content type
-
getContextPath
Description copied from interface:HttpServletRequest
Returns the context path.- Specified by:
getContextPath
in interfaceHttpServletRequest
- Returns:
- the context path
-
getCookies
Returns the cookies.- Specified by:
getCookies
in interfaceHttpServletRequest
- Returns:
- the cookies
-
getDateHeader
Returns the date header.- Specified by:
getDateHeader
in interfaceHttpServletRequest
- Parameters:
name
- the header name.- Returns:
- the date header
-
getDispatcherType
Returns the dispatcher type.- Specified by:
getDispatcherType
in interfaceServletRequest
- Returns:
- the dispatcher type
-
getHeader
Get the header.- Specified by:
getHeader
in interfaceHttpServletRequest
- Parameters:
name
- the header name.- Returns:
- the header value.
-
getHeaderNames
Returns the header names.- Specified by:
getHeaderNames
in interfaceHttpServletRequest
- Returns:
- the header names
-
getHeaders
Get the headers.- Specified by:
getHeaders
in interfaceHttpServletRequest
- Parameters:
name
- the header name.- Returns:
- the header values.
-
getHttpServletMapping
Description copied from interface:HttpServletRequest
Returns the HTTP servlet mapping.- Specified by:
getHttpServletMapping
in interfaceHttpServletRequest
- Returns:
- the HTTP servlet mapping
-
setHttpServletMapping
- Parameters:
httpServletMapping
- the httpServletMapping to set
-
getInputStream
Get the input stream.- Specified by:
getInputStream
in interfaceServletRequest
- Returns:
- the input stream.
- Throws:
IOException
- when a serious I/O error occurs.
-
getIntHeader
Returns the int header.- Specified by:
getIntHeader
in interfaceHttpServletRequest
- Parameters:
name
- the name.- Returns:
- the int header
-
getLocalAddr
Returns the local address.- Specified by:
getLocalAddr
in interfaceServletRequest
- Returns:
- the local address
-
getLocalName
Returns the local name.- Specified by:
getLocalName
in interfaceServletRequest
- Returns:
- the local name
-
getLocalPort
public int getLocalPort()Returns the local port.- Specified by:
getLocalPort
in interfaceServletRequest
- Returns:
- the local port
-
getLocale
Get locale.- Specified by:
getLocale
in interfaceServletRequest
- Returns:
- the locale.
-
getLocales
Returns the locales.- Specified by:
getLocales
in interfaceServletRequest
- Returns:
- the locales
-
getMethod
Description copied from interface:HttpServletRequest
Returns the HTTP method.- Specified by:
getMethod
in interfaceHttpServletRequest
- Returns:
- the HTTP method
-
getMultipartConfig
Description copied from interface:WebApplicationRequest
Returns the multipartConfig.- Specified by:
getMultipartConfig
in interfaceWebApplicationRequest
- Returns:
- the multipartConfig
-
setMultipartConfig
- Parameters:
multipartConfig
- the multipartConfig to set
-
getParameter
Description copied from interface:ServletRequest
Get the parameter.- Specified by:
getParameter
in interfaceServletRequest
- Parameters:
name
- the name.- Returns:
- the value or null if not found.
-
getParameterMap
Description copied from interface:ServletRequest
Returns the parameter map.- Specified by:
getParameterMap
in interfaceServletRequest
- Returns:
- the parameter map
-
getParameterNames
Description copied from interface:ServletRequest
Returns the parameter names.- Specified by:
getParameterNames
in interfaceServletRequest
- Returns:
- the parameter names
-
getParameterValues
Returns the parameter values.- Specified by:
getParameterValues
in interfaceServletRequest
- Parameters:
name
- the parameter name.- Returns:
- the parameter values
-
getParametersFromRequest
protected void getParametersFromRequest()Get the parameters from the request. -
getPart
Get the part.- Specified by:
getPart
in interfaceHttpServletRequest
- Parameters:
name
- the name.- Returns:
- the part, or null.
- Throws:
IOException
- when an I/O error occurs.ServletException
- when a servlet error occurs.
-
getParts
Get the parts.- Specified by:
getParts
in interfaceHttpServletRequest
- Returns:
- the parts.
- Throws:
IOException
- when an I/O error occurs.ServletException
- when a servlet error occurs.
-
getPathInfo
Returns the path info.- Specified by:
getPathInfo
in interfaceHttpServletRequest
- Returns:
- the path info
-
getPathTranslated
Returns the translated path.- Specified by:
getPathTranslated
in interfaceHttpServletRequest
- Returns:
- the translated path
-
getProtocol
Returns the protocol.- Specified by:
getProtocol
in interfaceServletRequest
- Returns:
- the protocol
-
getQueryString
Returns the query string.- Specified by:
getQueryString
in interfaceHttpServletRequest
- Returns:
- the query string
-
getReader
Get the reader.- Specified by:
getReader
in interfaceServletRequest
- Returns:
- the reader.
- Throws:
IOException
- when a serious I/O error occurs.
-
getRealPath
Deprecated.Returns the real path.- Specified by:
getRealPath
in interfaceServletRequest
- Parameters:
path
- the path.- Returns:
- the real path
-
getRemoteAddr
Returns the remote address.- Specified by:
getRemoteAddr
in interfaceServletRequest
- Returns:
- the remote address
-
getRemoteHost
Returns the remote host.- Specified by:
getRemoteHost
in interfaceServletRequest
- Returns:
- the remote host
-
getRemotePort
public int getRemotePort()Returns the remote port.- Specified by:
getRemotePort
in interfaceServletRequest
- Returns:
- the remote port
-
getRemoteUser
Returns the remote user.- Specified by:
getRemoteUser
in interfaceHttpServletRequest
- Returns:
- the remote user
-
getRequestDispatcher
Returns the request dispatcher.- Specified by:
getRequestDispatcher
in interfaceServletRequest
- Parameters:
path
- the path.- Returns:
- the request dispatcher
-
getRequestURI
Returns the request URI.- Specified by:
getRequestURI
in interfaceHttpServletRequest
- Returns:
- the request URI
-
getRequestURL
Returns the request URL.- Specified by:
getRequestURL
in interfaceHttpServletRequest
- Returns:
- the request URL
-
getRequestedSessionId
Returns the requested session id.- Specified by:
getRequestedSessionId
in interfaceHttpServletRequest
- Returns:
- the requested session id
-
getScheme
Returns the scheme.- Specified by:
getScheme
in interfaceServletRequest
- Returns:
- the scheme
-
getServerName
Returns the server name.- Specified by:
getServerName
in interfaceServletRequest
- Returns:
- the server name
-
getServerPort
public int getServerPort()Returns the server port.- Specified by:
getServerPort
in interfaceServletRequest
- Returns:
- the server port
-
getServletContext
Returns the servlet context.- Specified by:
getServletContext
in interfaceServletRequest
- Returns:
- the servlet context
-
getServletPath
Returns the servlet path.- Specified by:
getServletPath
in interfaceHttpServletRequest
- Returns:
- the servlet path
-
getSession
Returns the session.- Specified by:
getSession
in interfaceHttpServletRequest
- Returns:
- the session
-
getSession
Description copied from interface:HttpServletRequest
Get the HTTP session.- Specified by:
getSession
in interfaceHttpServletRequest
- Parameters:
create
- the create flag.- Returns:
- the HTTP session, or null if not found and create flag is false.
-
getUpgradeHandler
Returns the upgrade handler.- Returns:
- the upgrade handler
-
getUserPrincipal
Returns the user principal.- Specified by:
getUserPrincipal
in interfaceHttpServletRequest
- Returns:
- the user principal
-
isAsyncStarted
public boolean isAsyncStarted()Is async started.- Specified by:
isAsyncStarted
in interfaceServletRequest
- Returns:
- is async started.
-
isAsyncSupported
public boolean isAsyncSupported()Is async supported.- Specified by:
isAsyncSupported
in interfaceServletRequest
- Returns:
- true if is async is supported.
-
isRequestedSessionIdFromCookie
public boolean isRequestedSessionIdFromCookie()Is the requested session id from cookie.- Specified by:
isRequestedSessionIdFromCookie
in interfaceHttpServletRequest
- Returns:
- if the requested session id from cookie.
-
isRequestedSessionIdFromURL
public boolean isRequestedSessionIdFromURL()Is the requested session id from the request url.- Specified by:
isRequestedSessionIdFromURL
in interfaceHttpServletRequest
- Returns:
- if the requested session id from the request url.
-
isRequestedSessionIdFromUrl
Deprecated.Is the requested session id from the request url.- Specified by:
isRequestedSessionIdFromUrl
in interfaceHttpServletRequest
- Returns:
- if the requested session id from the request url.
-
isRequestedSessionIdValid
public boolean isRequestedSessionIdValid()Is the requested session id valid?- Specified by:
isRequestedSessionIdValid
in interfaceHttpServletRequest
- Returns:
- true if it is, false otherwise.
-
isSecure
public boolean isSecure()Is the request secure.- Specified by:
isSecure
in interfaceServletRequest
- Returns:
- is the request secure.
-
isUpgraded
public boolean isUpgraded()Is the request upgraded.- Returns:
- false
-
isUserInRole
Is the user in the specified role.- Specified by:
isUserInRole
in interfaceHttpServletRequest
- Parameters:
role
- the role.- Returns:
- if the user in the specified role.
-
login
Login.- Specified by:
login
in interfaceHttpServletRequest
- Parameters:
username
- the username.password
- the password.- Throws:
ServletException
- when a serious error occurs.
-
logout
Logout.- Specified by:
logout
in interfaceHttpServletRequest
- Throws:
ServletException
- when a serious error occurs.
-
removeAttribute
Remove the attribute.- Specified by:
removeAttribute
in interfaceServletRequest
- Parameters:
name
- the name.
-
setAsyncSupported
public void setAsyncSupported(boolean asyncSupported)Set the async supported flag.- Parameters:
asyncSupported
- the async supported flag.
-
setAttribute
Set the attribute.- Specified by:
setAttribute
in interfaceServletRequest
- Parameters:
name
- the name.value
- the value.
-
setAuthType
Set the auth type.- Parameters:
authType
- the auth type.
-
setCharacterEncoding
Set the character encoding.- Specified by:
setCharacterEncoding
in interfaceServletRequest
- Parameters:
characterEncoding
- the character encoding.- Throws:
UnsupportedEncodingException
- when the encoding is not supported.
-
setContentLength
public void setContentLength(int contentLength)Set the content length.- Parameters:
contentLength
- the content length.
-
setContentType
Set the content type.- Parameters:
contentType
- the content type.
-
setContextPath
Description copied from interface:WebApplicationRequest
Set the context path.- Specified by:
setContextPath
in interfaceWebApplicationRequest
- Parameters:
contextPath
- the context path.
-
setCookies
Set the cookies.- Parameters:
cookies
- the cookies.
-
setDispatcherType
Set the dispatcher type.- Specified by:
setDispatcherType
in interfaceWebApplicationRequest
- Parameters:
dispatcherType
- the dispatcher type.
-
setHeader
Set the header.- Parameters:
name
- the name.value
- the value (string).
-
setInputStream
Set the input stream.- Parameters:
inputStream
- the input stream.
-
setLocalAddr
Set the local address.- Parameters:
localAddress
- the local address.
-
setLocalName
Set the local name.- Parameters:
localName
- the local name.
-
setLocalPort
public void setLocalPort(int localPort)Set the local port.- Parameters:
localPort
- the local port.
-
setMethod
Set the method.- Parameters:
method
- the method.
-
setParameter
Set the parameter values.- Parameters:
name
- the parameter name.values
- the values.
-
setPathInfo
Set the path info.- Parameters:
pathInfo
- the path info.
-
setProtocol
Set the protocol.- Parameters:
protocol
- the protocol.
-
setQueryString
Set the query string.- Parameters:
queryString
- the query string.
-
setRemoteAddr
Set the remote address.- Parameters:
remoteAddr
- the remote address.
-
setRemoteHost
Set the remote host.- Parameters:
remoteHost
- the remote host.
-
setRemotePort
public void setRemotePort(int remotePort)Set the remote port.- Parameters:
remotePort
- the remote port.
-
setRequestedSessionId
Set the requested session id.- Parameters:
requestedSessionId
- the requested session id.
-
setRequestedSessionIdFromCookie
public void setRequestedSessionIdFromCookie(boolean requestedSessionIdFromCookie)Set the requested session id from cookie.- Parameters:
requestedSessionIdFromCookie
- the requested session id from cookie.
-
setRequestedSessionIdFromURL
public void setRequestedSessionIdFromURL(boolean requestedSessionIdFromURL)Set the request session id from URL flag.- Parameters:
requestedSessionIdFromURL
- the requested session if from URL flag.
-
setScheme
Set the scheme.- Parameters:
scheme
- the scheme.
-
setServerName
Set the server name.- Parameters:
serverName
- the server name.
-
setServerPort
public void setServerPort(int serverPort)Set the server port.- Parameters:
serverPort
- the server port.
-
setServletPath
Description copied from interface:WebApplicationRequest
Set the servlet path.- Specified by:
setServletPath
in interfaceWebApplicationRequest
- Parameters:
servletPath
- the servlet path.
-
getOriginalServletPath
Gets the original Servlet Path- Returns:
- the original Servlet Path
-
setOriginalServletPath
Set the original Servlet Path- Parameters:
originalServletPath
- the original Servlet Path
-
setUpgraded
public void setUpgraded(boolean upgraded)Set the upgraded flag.- Parameters:
upgraded
- the upgraded flag.
-
setUserPrincipal
Set the user principal.- Parameters:
userPrincipal
- the user principal.
-
setWebApplication
Description copied from interface:WebApplicationRequest
Set the web application.- Specified by:
setWebApplication
in interfaceWebApplicationRequest
- Parameters:
webApplication
- the web application.
-
startAsync
Start async.- Specified by:
startAsync
in interfaceServletRequest
- Returns:
- the async context.
- Throws:
IllegalStateException
- when async is not supported.
-
unwrap
Unwrap the request.- Type Parameters:
T
- the type to unwrap to.- Parameters:
request
- the request.type
- the class type of the result- Returns:
- the unwrapped request.
-
setAsyncStarted
public void setAsyncStarted(boolean asyncStarted)Set the async started flag.- Parameters:
asyncStarted
- the async started flag.
-
startAsync
public AsyncContext startAsync(ServletRequest request, ServletResponse response) throws IllegalStateExceptionStart async.- Specified by:
startAsync
in interfaceServletRequest
- Parameters:
request
- the request.response
- the response.- Returns:
- the async context.
- Throws:
IllegalStateException
- when async is not supported.
-
upgrade
public <T extends HttpUpgradeHandler> T upgrade(Class<T> handlerClass) throws IOException, ServletExceptionUpgrade the request.- Specified by:
upgrade
in interfaceHttpServletRequest
- Type Parameters:
T
- the type.- Parameters:
handlerClass
- the handler class.- Returns:
- the upgrade handler.
- Throws:
IOException
- when an I/O error occurs.ServletException
- when a serious error occurs.
-
verifyMultipartFormData
Verify the method is of type "multipart/form-data"- Throws:
ServletException
- the exception thrown when it is not.
-
isFinished
public boolean isFinished()Is the Servlet input stream finished?- Specified by:
isFinished
in classServletInputStream
- Returns:
- true if it is, false otherwise.
-
isReady
public boolean isReady()Is the Servlet input stream ready?- Specified by:
isReady
in classServletInputStream
- Returns:
- true if it is, false otherwise.
-
setReadListener
Set the read listener.- Specified by:
setReadListener
in classServletInputStream
- Parameters:
listener
- the read listener.
-
read
Read from the Servlet input stream.- Specified by:
read
in classInputStream
- Returns:
- the read value.
- Throws:
IOException
- when an I/O error occurs.
-
toString
-
getRequestURIWithQueryString
Returns the request URI with query string.- Returns:
- the request URI with query string
-