Package org.atmosphere.cpr
Interface AtmosphereRequest
- All Superinterfaces:
HttpServletRequest,ServletRequest
- All Known Implementing Classes:
AtmosphereRequestImpl
An Atmosphere request representation. An
AtmosphereRequest is a two-way communication channel between the
client and the server. If the AtmosphereRequestImpl.isDestroyable() is set to false, or if its
associated AtmosphereResource has been suspended, this object can be re-used at any moment between requests.
You can use its associated AtmosphereResponse to write bytes at any moment, making this object bi-directional.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfacestatic final class -
Field Summary
Fields inherited from interface jakarta.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH -
Method Summary
Modifier and TypeMethodDescriptionbody()Return the request's body.body(byte[] bytes) body(InputStream body) contextPath(String contextPath) voiddestroy()voiddestroy(boolean force) destroyable(boolean destroyable) booleanbooleanDispatch the request asynchronously to container.Add a header.Add all headers contained within the Map.booleanCheck if this object can be destroyed.Return a subset of the attributes set on this AtmosphereRequest, set locally by the framework or by an application.queryString(String qs) Set the query string.requestURI(String requestURI) resource()TheAtmosphereResourceassociated with this request.servletPath(String servletPath) uuid()Return the underlyingAtmosphereResource.uuid().Methods inherited from interface jakarta.servlet.http.HttpServletRequest
authenticate, changeSessionId, getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getHttpServletMapping, getIntHeader, getMethod, getPart, getParts, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getTrailerFields, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isTrailerFieldsReady, isUserInRole, login, logout, newPushBuilder, upgradeMethods inherited from interface jakarta.servlet.ServletRequest
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
-
Method Details
-
destroyed
boolean destroyed() -
destroyable
-
wrappedRequest
HttpServletRequest wrappedRequest() -
getHeader
-
headers
Add all headers contained within the Map.- Parameters:
headers-- Returns:
- this;
-
header
Add a header.- Parameters:
name-value-- Returns:
- this
-
queryString
Set the query string.- Parameters:
qs-- Returns:
- this
-
headersMap
-
queryStringsMap
-
method
-
contentType
-
body
-
body
-
body
-
body
-
body
AtmosphereRequestImpl.Body body()Return the request's body. This method will return an empty Body if the underlying container or framework is using InputStream or Reader.- Returns:
- the request body;
-
servletPath
-
contextPath
-
requestURI
-
resource
AtmosphereResource resource()TheAtmosphereResourceassociated with this request.- Returns:
- an
AtmosphereResource
-
dispatchRequestAsynchronously
boolean dispatchRequestAsynchronously()Dispatch the request asynchronously to container. The default is false.- Returns:
- true to dispatch the request asynchronously to container.
-
isDestroyable
boolean isDestroyable()Check if this object can be destroyed. Default is true. -
pathInfo
-
localAttributes
AtmosphereRequest.LocalAttributes localAttributes()Return a subset of the attributes set on this AtmosphereRequest, set locally by the framework or by an application. Attributes added using this method won't be propagated to the original, container-only, native request object.- Returns:
- a
-
uuid
String uuid()Return the underlyingAtmosphereResource.uuid(). May return "0" if noAtmosphereResourceis associated with this object.- Returns:
- the underlying
AtmosphereResource.uuid()
-
destroy
void destroy() -
destroy
void destroy(boolean force) -
requestURL
String requestURL()
-