Package org.atmosphere.cpr
Class AtmosphereRequestImpl
- java.lang.Object
-
- jakarta.servlet.ServletRequestWrapper
-
- jakarta.servlet.http.HttpServletRequestWrapper
-
- org.atmosphere.cpr.AtmosphereRequestImpl
-
- All Implemented Interfaces:
jakarta.servlet.http.HttpServletRequest,jakarta.servlet.ServletRequest,AtmosphereRequest
public class AtmosphereRequestImpl extends jakarta.servlet.http.HttpServletRequestWrapper implements AtmosphereRequest
An Atmosphere request representation. AnAtmosphereRequestis a two-way communication channel between the client and the server. If theisDestroyable()is set to false, or if its associatedAtmosphereResourcehas been suspended, this object can be re-used at any moment between requests. You can use its associatedAtmosphereResponseto write bytes at any moment, making this object bi-directional.- Author:
- Jeanfrancois Arcand
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAtmosphereRequestImpl.Bodystatic classAtmosphereRequestImpl.Builderstatic classAtmosphereRequestImpl.LazyComputationstatic classAtmosphereRequestImpl.NoOpsRequest-
Nested classes/interfaces inherited from interface org.atmosphere.cpr.AtmosphereRequest
AtmosphereRequest.LocalAttributes
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AtmosphereRequest.LocalAttributesattributes()Return the locally added attributes.booleanauthenticate(jakarta.servlet.http.HttpServletResponse response)AtmosphereRequestImpl.Bodybody()Return the request's body.AtmosphereRequestbody(byte[] bytes)AtmosphereRequestbody(java.io.InputStream body)AtmosphereRequestbody(java.io.Reader body)AtmosphereRequestbody(java.lang.String body)static AtmosphereRequestcloneRequest(jakarta.servlet.http.HttpServletRequest request, boolean loadInMemory, boolean copySession, boolean isDestroyable, boolean createSession)Copy the HttpServletRequest content inside an AtmosphereRequest.AtmosphereRequestcontentType(java.lang.String m)AtmosphereRequestcontextPath(java.lang.String contextPath)voiddestroy()voiddestroy(boolean force)AtmosphereRequestdestroyable(boolean destroyable)booleandestroyed()booleandispatchRequestAsynchronously()Dispatch the request asynchronously to container.jakarta.servlet.AsyncContextgetAsyncContext()java.lang.ObjectgetAttribute(java.lang.String s)java.util.Enumeration<java.lang.String>getAttributeNames()java.lang.StringgetAuthType()java.lang.StringgetCharacterEncoding()intgetContentLength()java.lang.StringgetContentType()java.lang.StringgetContextPath()jakarta.servlet.http.Cookie[]getCookies()longgetDateHeader(java.lang.String name)jakarta.servlet.DispatcherTypegetDispatcherType()java.lang.StringgetHeader(java.lang.String s)java.lang.StringgetHeader(java.lang.String s, boolean checkCase)java.util.Enumeration<java.lang.String>getHeaderNames()java.util.EnumerationgetHeaders(java.lang.String name)jakarta.servlet.ServletInputStreamgetInputStream()intgetIntHeader(java.lang.String name)java.lang.StringgetLocalAddr()java.util.LocalegetLocale()java.util.Enumeration<java.util.Locale>getLocales()java.lang.StringgetLocalName()intgetLocalPort()java.lang.StringgetMethod()java.lang.StringgetParameter(java.lang.String s)java.util.Map<java.lang.String,java.lang.String[]>getParameterMap()java.util.Enumeration<java.lang.String>getParameterNames()java.lang.String[]getParameterValues(java.lang.String s)jakarta.servlet.http.PartgetPart(java.lang.String name)java.util.Collection<jakarta.servlet.http.Part>getParts()java.lang.StringgetPathInfo()java.lang.StringgetPathTranslated()java.lang.StringgetProtocol()java.lang.StringgetQueryString()java.io.BufferedReadergetReader()java.lang.StringgetRealPath(java.lang.String path)java.lang.StringgetRemoteAddr()java.lang.StringgetRemoteHost()intgetRemotePort()java.lang.StringgetRemoteUser()jakarta.servlet.RequestDispatchergetRequestDispatcher(java.lang.String path)java.lang.StringgetRequestedSessionId()java.lang.StringgetRequestURI()java.lang.StringBuffergetRequestURL()java.lang.StringgetScheme()java.lang.StringgetServerName()intgetServerPort()jakarta.servlet.ServletContextgetServletContext()java.lang.StringgetServletPath()jakarta.servlet.http.HttpSessiongetSession()jakarta.servlet.http.HttpSessiongetSession(boolean create)java.security.PrincipalgetUserPrincipal()AtmosphereRequestheader(java.lang.String name, java.lang.String value)Add a header.AtmosphereRequestheaders(java.util.Map<java.lang.String,java.lang.String> headers)Add all headers contained within the Map.java.util.Map<java.lang.String,java.lang.String>headersMap()booleanisAsyncStarted()booleanisAsyncSupported()booleanisDestroyable()Cjeck if this object can be destroyed.booleanisRequestedSessionIdFromCookie()booleanisRequestedSessionIdFromUrl()booleanisRequestedSessionIdFromURL()booleanisRequestedSessionIdValid()booleanisSecure()booleanisUserInRole(java.lang.String role)AtmosphereRequest.LocalAttributeslocalAttributes()Return a subset of the attributes set on this AtmosphereRequest, set locally by the framework or by an application.voidlogin(java.lang.String username, java.lang.String password)voidlogout()AtmosphereRequestmethod(java.lang.String m)static AtmosphereRequestnewInstance()Create an instance of this class without an associatedHttpServletRequest.AtmosphereRequestpathInfo(java.lang.String pathInfo)AtmosphereRequestqueryString(java.lang.String qs)Set the query string.java.util.Map<java.lang.String,java.lang.String[]>queryStringsMap()voidremoveAttribute(java.lang.String name)AtmosphereRequestrequestURI(java.lang.String requestURI)java.lang.StringrequestURL()AtmosphereResourceresource()TheAtmosphereResourceassociated with this request.AtmosphereRequestservletPath(java.lang.String servletPath)voidsetAttribute(java.lang.String s, java.lang.Object o)voidsetCharacterEncoding(java.lang.String env)voidsetRequest(jakarta.servlet.ServletRequest request)jakarta.servlet.AsyncContextstartAsync()jakarta.servlet.AsyncContextstartAsync(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response)java.lang.StringtoString()java.lang.Stringuuid()Return the underlyingAtmosphereResource.uuid().static AtmosphereRequestwrap(jakarta.servlet.http.HttpServletRequest request)Wrap anHttpServletRequest.jakarta.servlet.http.HttpServletRequestwrappedRequest()-
Methods inherited from class jakarta.servlet.http.HttpServletRequestWrapper
changeSessionId, getHttpServletMapping, getTrailerFields, isTrailerFieldsReady, newPushBuilder, upgrade
-
Methods inherited from class jakarta.servlet.ServletRequestWrapper
getContentLengthLong, getRequest, isWrapperFor, isWrapperFor
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
destroyed
public boolean destroyed()
- Specified by:
destroyedin interfaceAtmosphereRequest
-
destroyable
public AtmosphereRequest destroyable(boolean destroyable)
- Specified by:
destroyablein interfaceAtmosphereRequest
-
getPathInfo
public java.lang.String getPathInfo()
Description copied from interface:AtmosphereRequest- Specified by:
getPathInfoin interfaceAtmosphereRequest- Specified by:
getPathInfoin interfacejakarta.servlet.http.HttpServletRequest- Overrides:
getPathInfoin classjakarta.servlet.http.HttpServletRequestWrapper
-
getPathTranslated
public java.lang.String getPathTranslated()
Description copied from interface:AtmosphereRequest- Specified by:
getPathTranslatedin interfaceAtmosphereRequest- Specified by:
getPathTranslatedin interfacejakarta.servlet.http.HttpServletRequest- Overrides:
getPathTranslatedin classjakarta.servlet.http.HttpServletRequestWrapper
-
getQueryString
public java.lang.String getQueryString()
Description copied from interface:AtmosphereRequest- Specified by:
getQueryStringin interfaceAtmosphereRequest- Specified by:
getQueryStringin interfacejakarta.servlet.http.HttpServletRequest- Overrides:
getQueryStringin classjakarta.servlet.http.HttpServletRequestWrapper
-
getRemoteUser
public java.lang.String getRemoteUser()
Description copied from interface:AtmosphereRequest- Specified by:
getRemoteUserin interfaceAtmosphereRequest- Specified by:
getRemoteUserin interfacejakarta.servlet.http.HttpServletRequest- Overrides:
getRemoteUserin classjakarta.servlet.http.HttpServletRequestWrapper
-
getRequestedSessionId
public java.lang.String getRequestedSessionId()
Description copied from interface:AtmosphereRequest- Specified by:
getRequestedSessionIdin interfaceAtmosphereRequest- Specified by:
getRequestedSessionIdin interfacejakarta.servlet.http.HttpServletRequest- Overrides:
getRequestedSessionIdin classjakarta.servlet.http.HttpServletRequestWrapper
-
getMethod
public java.lang.String getMethod()
Description copied from interface:AtmosphereRequest- Specified by:
getMethodin interfaceAtmosphereRequest- Specified by:
getMethodin interfacejakarta.servlet.http.HttpServletRequest- Overrides:
getMethodin classjakarta.servlet.http.HttpServletRequestWrapper
-
getPart
public jakarta.servlet.http.Part getPart(java.lang.String name) throws java.io.IOException, jakarta.servlet.ServletExceptionDescription copied from interface:AtmosphereRequest- Specified by:
getPartin interfaceAtmosphereRequest- Specified by:
getPartin interfacejakarta.servlet.http.HttpServletRequest- Overrides:
getPartin classjakarta.servlet.http.HttpServletRequestWrapper- Throws:
java.io.IOExceptionjakarta.servlet.ServletException
-
getParts
public java.util.Collection<jakarta.servlet.http.Part> getParts() throws java.io.IOException, jakarta.servlet.ServletExceptionDescription copied from interface:AtmosphereRequest- Specified by:
getPartsin interfaceAtmosphereRequest- Specified by:
getPartsin interfacejakarta.servlet.http.HttpServletRequest- Overrides:
getPartsin classjakarta.servlet.http.HttpServletRequestWrapper- Throws:
java.io.IOExceptionjakarta.servlet.ServletException
-
getContentType
public java.lang.String getContentType()
Description copied from interface:AtmosphereRequest- Specified by:
getContentTypein interfaceAtmosphereRequest- Specified by:
getContentTypein interfacejakarta.servlet.ServletRequest- Overrides:
getContentTypein classjakarta.servlet.ServletRequestWrapper
-
getDispatcherType
public jakarta.servlet.DispatcherType getDispatcherType()
Description copied from interface:AtmosphereRequest- Specified by:
getDispatcherTypein interfaceAtmosphereRequest- Specified by:
getDispatcherTypein interfacejakarta.servlet.ServletRequest- Overrides:
getDispatcherTypein classjakarta.servlet.ServletRequestWrapper
-
getServletPath
public java.lang.String getServletPath()
Description copied from interface:AtmosphereRequest- Specified by:
getServletPathin interfaceAtmosphereRequest- Specified by:
getServletPathin interfacejakarta.servlet.http.HttpServletRequest- Overrides:
getServletPathin classjakarta.servlet.http.HttpServletRequestWrapper
-
getRequestURI
public java.lang.String getRequestURI()
Description copied from interface:AtmosphereRequest- Specified by:
getRequestURIin interfaceAtmosphereRequest- Specified by:
getRequestURIin interfacejakarta.servlet.http.HttpServletRequest- Overrides:
getRequestURIin classjakarta.servlet.http.HttpServletRequestWrapper
-
getRequestURL
public java.lang.StringBuffer getRequestURL()
Description copied from interface:AtmosphereRequest- Specified by:
getRequestURLin interfaceAtmosphereRequest- Specified by:
getRequestURLin interfacejakarta.servlet.http.HttpServletRequest- Overrides:
getRequestURLin classjakarta.servlet.http.HttpServletRequestWrapper
-
getHeaders
public java.util.Enumeration getHeaders(java.lang.String name)
Description copied from interface:AtmosphereRequest- Specified by:
getHeadersin interfaceAtmosphereRequest- Specified by:
getHeadersin interfacejakarta.servlet.http.HttpServletRequest- Overrides:
getHeadersin classjakarta.servlet.http.HttpServletRequestWrapper
-
getIntHeader
public int getIntHeader(java.lang.String name)
Description copied from interface:AtmosphereRequest- Specified by:
getIntHeaderin interfaceAtmosphereRequest- Specified by:
getIntHeaderin interfacejakarta.servlet.http.HttpServletRequest- Overrides:
getIntHeaderin classjakarta.servlet.http.HttpServletRequestWrapper
-
getHeaderNames
public java.util.Enumeration<java.lang.String> getHeaderNames()
Description copied from interface:AtmosphereRequest- Specified by:
getHeaderNamesin interfaceAtmosphereRequest- Specified by:
getHeaderNamesin interfacejakarta.servlet.http.HttpServletRequest- Overrides:
getHeaderNamesin classjakarta.servlet.http.HttpServletRequestWrapper
-
authenticate
public boolean authenticate(jakarta.servlet.http.HttpServletResponse response) throws java.io.IOException, jakarta.servlet.ServletExceptionDescription copied from interface:AtmosphereRequest- Specified by:
authenticatein interfaceAtmosphereRequest- Specified by:
authenticatein interfacejakarta.servlet.http.HttpServletRequest- Overrides:
authenticatein classjakarta.servlet.http.HttpServletRequestWrapper- Throws:
java.io.IOExceptionjakarta.servlet.ServletException
-
getAuthType
public java.lang.String getAuthType()
Description copied from interface:AtmosphereRequest- Specified by:
getAuthTypein interfaceAtmosphereRequest- Specified by:
getAuthTypein interfacejakarta.servlet.http.HttpServletRequest- Overrides:
getAuthTypein classjakarta.servlet.http.HttpServletRequestWrapper
-
getContextPath
public java.lang.String getContextPath()
Description copied from interface:AtmosphereRequest- Specified by:
getContextPathin interfaceAtmosphereRequest- Specified by:
getContextPathin interfacejakarta.servlet.http.HttpServletRequest- Overrides:
getContextPathin classjakarta.servlet.http.HttpServletRequestWrapper
-
getCookies
public jakarta.servlet.http.Cookie[] getCookies()
Description copied from interface:AtmosphereRequest- Specified by:
getCookiesin interfaceAtmosphereRequest- Specified by:
getCookiesin interfacejakarta.servlet.http.HttpServletRequest- Overrides:
getCookiesin classjakarta.servlet.http.HttpServletRequestWrapper
-
getDateHeader
public long getDateHeader(java.lang.String name)
Description copied from interface:AtmosphereRequest- Specified by:
getDateHeaderin interfaceAtmosphereRequest- Specified by:
getDateHeaderin interfacejakarta.servlet.http.HttpServletRequest- Overrides:
getDateHeaderin classjakarta.servlet.http.HttpServletRequestWrapper
-
getHeader
public java.lang.String getHeader(java.lang.String s)
Description copied from interface:AtmosphereRequest- Specified by:
getHeaderin interfaceAtmosphereRequest- Specified by:
getHeaderin interfacejakarta.servlet.http.HttpServletRequest- Overrides:
getHeaderin classjakarta.servlet.http.HttpServletRequestWrapper
-
wrappedRequest
public jakarta.servlet.http.HttpServletRequest wrappedRequest()
- Specified by:
wrappedRequestin interfaceAtmosphereRequest
-
getHeader
public java.lang.String getHeader(java.lang.String s, boolean checkCase)- Specified by:
getHeaderin interfaceAtmosphereRequest
-
getParameter
public java.lang.String getParameter(java.lang.String s)
Description copied from interface:AtmosphereRequest- Specified by:
getParameterin interfaceAtmosphereRequest- Specified by:
getParameterin interfacejakarta.servlet.ServletRequest- Overrides:
getParameterin classjakarta.servlet.ServletRequestWrapper
-
getParameterMap
public java.util.Map<java.lang.String,java.lang.String[]> getParameterMap()
Description copied from interface:AtmosphereRequest- Specified by:
getParameterMapin interfaceAtmosphereRequest- Specified by:
getParameterMapin interfacejakarta.servlet.ServletRequest- Overrides:
getParameterMapin classjakarta.servlet.ServletRequestWrapper
-
getParameterNames
public java.util.Enumeration<java.lang.String> getParameterNames()
Description copied from interface:AtmosphereRequest- Specified by:
getParameterNamesin interfaceAtmosphereRequest- Specified by:
getParameterNamesin interfacejakarta.servlet.ServletRequest- Overrides:
getParameterNamesin classjakarta.servlet.ServletRequestWrapper
-
getParameterValues
public java.lang.String[] getParameterValues(java.lang.String s)
Description copied from interface:AtmosphereRequest- Specified by:
getParameterValuesin interfaceAtmosphereRequest- Specified by:
getParameterValuesin interfacejakarta.servlet.ServletRequest- Overrides:
getParameterValuesin classjakarta.servlet.ServletRequestWrapper
-
getProtocol
public java.lang.String getProtocol()
Description copied from interface:AtmosphereRequest- Specified by:
getProtocolin interfaceAtmosphereRequest- Specified by:
getProtocolin interfacejakarta.servlet.ServletRequest- Overrides:
getProtocolin classjakarta.servlet.ServletRequestWrapper
-
getInputStream
public jakarta.servlet.ServletInputStream getInputStream() throws java.io.IOExceptionDescription copied from interface:AtmosphereRequest- Specified by:
getInputStreamin interfaceAtmosphereRequest- Specified by:
getInputStreamin interfacejakarta.servlet.ServletRequest- Overrides:
getInputStreamin classjakarta.servlet.ServletRequestWrapper- Throws:
java.io.IOException
-
getReader
public java.io.BufferedReader getReader() throws java.io.IOExceptionDescription copied from interface:AtmosphereRequest- Specified by:
getReaderin interfaceAtmosphereRequest- Specified by:
getReaderin interfacejakarta.servlet.ServletRequest- Overrides:
getReaderin classjakarta.servlet.ServletRequestWrapper- Throws:
java.io.IOException
-
getRealPath
public java.lang.String getRealPath(java.lang.String path)
Description copied from interface:AtmosphereRequest- Specified by:
getRealPathin interfaceAtmosphereRequest- Specified by:
getRealPathin interfacejakarta.servlet.ServletRequest- Overrides:
getRealPathin classjakarta.servlet.ServletRequestWrapper
-
headers
public AtmosphereRequest headers(java.util.Map<java.lang.String,java.lang.String> headers)
Description copied from interface:AtmosphereRequestAdd all headers contained within the Map.- Specified by:
headersin interfaceAtmosphereRequest- Returns:
- this;
-
header
public AtmosphereRequest header(java.lang.String name, java.lang.String value)
Description copied from interface:AtmosphereRequestAdd a header.- Specified by:
headerin interfaceAtmosphereRequest- Returns:
- this
-
queryString
public AtmosphereRequest queryString(java.lang.String qs)
Description copied from interface:AtmosphereRequestSet the query string.- Specified by:
queryStringin interfaceAtmosphereRequest- Returns:
- this
-
headersMap
public java.util.Map<java.lang.String,java.lang.String> headersMap()
- Specified by:
headersMapin interfaceAtmosphereRequest
-
queryStringsMap
public java.util.Map<java.lang.String,java.lang.String[]> queryStringsMap()
- Specified by:
queryStringsMapin interfaceAtmosphereRequest
-
method
public AtmosphereRequest method(java.lang.String m)
- Specified by:
methodin interfaceAtmosphereRequest
-
contentType
public AtmosphereRequest contentType(java.lang.String m)
- Specified by:
contentTypein interfaceAtmosphereRequest
-
body
public AtmosphereRequest body(java.lang.String body)
- Specified by:
bodyin interfaceAtmosphereRequest
-
body
public AtmosphereRequest body(byte[] bytes)
- Specified by:
bodyin interfaceAtmosphereRequest
-
body
public AtmosphereRequest body(java.io.InputStream body)
- Specified by:
bodyin interfaceAtmosphereRequest
-
body
public AtmosphereRequest body(java.io.Reader body)
- Specified by:
bodyin interfaceAtmosphereRequest
-
body
public AtmosphereRequestImpl.Body body()
Description copied from interface:AtmosphereRequestReturn the request's body. This method will return an empty Body if the underlying container or framework is using InputStream or Reader.- Specified by:
bodyin interfaceAtmosphereRequest- Returns:
- the request body;
-
servletPath
public AtmosphereRequest servletPath(java.lang.String servletPath)
- Specified by:
servletPathin interfaceAtmosphereRequest
-
contextPath
public AtmosphereRequest contextPath(java.lang.String contextPath)
- Specified by:
contextPathin interfaceAtmosphereRequest
-
requestURI
public AtmosphereRequest requestURI(java.lang.String requestURI)
- Specified by:
requestURIin interfaceAtmosphereRequest
-
setAttribute
public void setAttribute(java.lang.String s, java.lang.Object o)Description copied from interface:AtmosphereRequest- Specified by:
setAttributein interfaceAtmosphereRequest- Specified by:
setAttributein interfacejakarta.servlet.ServletRequest- Overrides:
setAttributein classjakarta.servlet.ServletRequestWrapper
-
setCharacterEncoding
public void setCharacterEncoding(java.lang.String env) throws java.io.UnsupportedEncodingExceptionDescription copied from interface:AtmosphereRequest- Specified by:
setCharacterEncodingin interfaceAtmosphereRequest- Specified by:
setCharacterEncodingin interfacejakarta.servlet.ServletRequest- Overrides:
setCharacterEncodingin classjakarta.servlet.ServletRequestWrapper- Throws:
java.io.UnsupportedEncodingException
-
startAsync
public jakarta.servlet.AsyncContext startAsync()
Description copied from interface:AtmosphereRequest- Specified by:
startAsyncin interfaceAtmosphereRequest- Specified by:
startAsyncin interfacejakarta.servlet.ServletRequest- Overrides:
startAsyncin classjakarta.servlet.ServletRequestWrapper
-
startAsync
public jakarta.servlet.AsyncContext startAsync(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response)Description copied from interface:AtmosphereRequest- Specified by:
startAsyncin interfaceAtmosphereRequest- Specified by:
startAsyncin interfacejakarta.servlet.ServletRequest- Overrides:
startAsyncin classjakarta.servlet.ServletRequestWrapper
-
getAsyncContext
public jakarta.servlet.AsyncContext getAsyncContext()
Description copied from interface:AtmosphereRequest- Specified by:
getAsyncContextin interfaceAtmosphereRequest- Specified by:
getAsyncContextin interfacejakarta.servlet.ServletRequest- Overrides:
getAsyncContextin classjakarta.servlet.ServletRequestWrapper
-
getAttribute
public java.lang.Object getAttribute(java.lang.String s)
Description copied from interface:AtmosphereRequest- Specified by:
getAttributein interfaceAtmosphereRequest- Specified by:
getAttributein interfacejakarta.servlet.ServletRequest- Overrides:
getAttributein classjakarta.servlet.ServletRequestWrapper
-
removeAttribute
public void removeAttribute(java.lang.String name)
Description copied from interface:AtmosphereRequest- Specified by:
removeAttributein interfaceAtmosphereRequest- Specified by:
removeAttributein interfacejakarta.servlet.ServletRequest- Overrides:
removeAttributein classjakarta.servlet.ServletRequestWrapper
-
attributes
public AtmosphereRequest.LocalAttributes attributes()
Description copied from interface:AtmosphereRequestReturn the locally added attributes.- Specified by:
attributesin interfaceAtmosphereRequest- Returns:
- the locally added attributes
-
getSession
public jakarta.servlet.http.HttpSession getSession()
Description copied from interface:AtmosphereRequest- Specified by:
getSessionin interfaceAtmosphereRequest- Specified by:
getSessionin interfacejakarta.servlet.http.HttpServletRequest- Overrides:
getSessionin classjakarta.servlet.http.HttpServletRequestWrapper
-
getSession
public jakarta.servlet.http.HttpSession getSession(boolean create)
Description copied from interface:AtmosphereRequest- Specified by:
getSessionin interfaceAtmosphereRequest- Specified by:
getSessionin interfacejakarta.servlet.http.HttpServletRequest- Overrides:
getSessionin classjakarta.servlet.http.HttpServletRequestWrapper
-
getUserPrincipal
public java.security.Principal getUserPrincipal()
Description copied from interface:AtmosphereRequest- Specified by:
getUserPrincipalin interfaceAtmosphereRequest- Specified by:
getUserPrincipalin interfacejakarta.servlet.http.HttpServletRequest- Overrides:
getUserPrincipalin classjakarta.servlet.http.HttpServletRequestWrapper
-
isRequestedSessionIdFromCookie
public boolean isRequestedSessionIdFromCookie()
Description copied from interface:AtmosphereRequest- Specified by:
isRequestedSessionIdFromCookiein interfaceAtmosphereRequest- Specified by:
isRequestedSessionIdFromCookiein interfacejakarta.servlet.http.HttpServletRequest- Overrides:
isRequestedSessionIdFromCookiein classjakarta.servlet.http.HttpServletRequestWrapper
-
isRequestedSessionIdFromUrl
public boolean isRequestedSessionIdFromUrl()
Description copied from interface:AtmosphereRequest- Specified by:
isRequestedSessionIdFromUrlin interfaceAtmosphereRequest- Specified by:
isRequestedSessionIdFromUrlin interfacejakarta.servlet.http.HttpServletRequest- Overrides:
isRequestedSessionIdFromUrlin classjakarta.servlet.http.HttpServletRequestWrapper
-
isRequestedSessionIdFromURL
public boolean isRequestedSessionIdFromURL()
Description copied from interface:AtmosphereRequest- Specified by:
isRequestedSessionIdFromURLin interfaceAtmosphereRequest- Specified by:
isRequestedSessionIdFromURLin interfacejakarta.servlet.http.HttpServletRequest- Overrides:
isRequestedSessionIdFromURLin classjakarta.servlet.http.HttpServletRequestWrapper
-
isRequestedSessionIdValid
public boolean isRequestedSessionIdValid()
Description copied from interface:AtmosphereRequest- Specified by:
isRequestedSessionIdValidin interfaceAtmosphereRequest- Specified by:
isRequestedSessionIdValidin interfacejakarta.servlet.http.HttpServletRequest- Overrides:
isRequestedSessionIdValidin classjakarta.servlet.http.HttpServletRequestWrapper
-
isUserInRole
public boolean isUserInRole(java.lang.String role)
Description copied from interface:AtmosphereRequest- Specified by:
isUserInRolein interfaceAtmosphereRequest- Specified by:
isUserInRolein interfacejakarta.servlet.http.HttpServletRequest- Overrides:
isUserInRolein classjakarta.servlet.http.HttpServletRequestWrapper
-
login
public void login(java.lang.String username, java.lang.String password) throws jakarta.servlet.ServletExceptionDescription copied from interface:AtmosphereRequest- Specified by:
loginin interfaceAtmosphereRequest- Specified by:
loginin interfacejakarta.servlet.http.HttpServletRequest- Overrides:
loginin classjakarta.servlet.http.HttpServletRequestWrapper- Throws:
jakarta.servlet.ServletException
-
logout
public void logout() throws jakarta.servlet.ServletExceptionDescription copied from interface:AtmosphereRequest- Specified by:
logoutin interfaceAtmosphereRequest- Specified by:
logoutin interfacejakarta.servlet.http.HttpServletRequest- Overrides:
logoutin classjakarta.servlet.http.HttpServletRequestWrapper- Throws:
jakarta.servlet.ServletException
-
getRemoteAddr
public java.lang.String getRemoteAddr()
Description copied from interface:AtmosphereRequest- Specified by:
getRemoteAddrin interfaceAtmosphereRequest- Specified by:
getRemoteAddrin interfacejakarta.servlet.ServletRequest- Overrides:
getRemoteAddrin classjakarta.servlet.ServletRequestWrapper
-
getRemoteHost
public java.lang.String getRemoteHost()
Description copied from interface:AtmosphereRequest- Specified by:
getRemoteHostin interfaceAtmosphereRequest- Specified by:
getRemoteHostin interfacejakarta.servlet.ServletRequest- Overrides:
getRemoteHostin classjakarta.servlet.ServletRequestWrapper
-
getRemotePort
public int getRemotePort()
Description copied from interface:AtmosphereRequest- Specified by:
getRemotePortin interfaceAtmosphereRequest- Specified by:
getRemotePortin interfacejakarta.servlet.ServletRequest- Overrides:
getRemotePortin classjakarta.servlet.ServletRequestWrapper
-
getRequestDispatcher
public jakarta.servlet.RequestDispatcher getRequestDispatcher(java.lang.String path)
Description copied from interface:AtmosphereRequest- Specified by:
getRequestDispatcherin interfaceAtmosphereRequest- Specified by:
getRequestDispatcherin interfacejakarta.servlet.ServletRequest- Overrides:
getRequestDispatcherin classjakarta.servlet.ServletRequestWrapper
-
getScheme
public java.lang.String getScheme()
Description copied from interface:AtmosphereRequest- Specified by:
getSchemein interfaceAtmosphereRequest- Specified by:
getSchemein interfacejakarta.servlet.ServletRequest- Overrides:
getSchemein classjakarta.servlet.ServletRequestWrapper
-
getServerName
public java.lang.String getServerName()
Description copied from interface:AtmosphereRequest- Specified by:
getServerNamein interfaceAtmosphereRequest- Specified by:
getServerNamein interfacejakarta.servlet.ServletRequest- Overrides:
getServerNamein classjakarta.servlet.ServletRequestWrapper
-
getServerPort
public int getServerPort()
Description copied from interface:AtmosphereRequest- Specified by:
getServerPortin interfaceAtmosphereRequest- Specified by:
getServerPortin interfacejakarta.servlet.ServletRequest- Overrides:
getServerPortin classjakarta.servlet.ServletRequestWrapper
-
getServletContext
public jakarta.servlet.ServletContext getServletContext()
Description copied from interface:AtmosphereRequest- Specified by:
getServletContextin interfaceAtmosphereRequest- Specified by:
getServletContextin interfacejakarta.servlet.ServletRequest- Overrides:
getServletContextin classjakarta.servlet.ServletRequestWrapper
-
isAsyncStarted
public boolean isAsyncStarted()
Description copied from interface:AtmosphereRequest- Specified by:
isAsyncStartedin interfaceAtmosphereRequest- Specified by:
isAsyncStartedin interfacejakarta.servlet.ServletRequest- Overrides:
isAsyncStartedin classjakarta.servlet.ServletRequestWrapper
-
isAsyncSupported
public boolean isAsyncSupported()
Description copied from interface:AtmosphereRequest- Specified by:
isAsyncSupportedin interfaceAtmosphereRequest- Specified by:
isAsyncSupportedin interfacejakarta.servlet.ServletRequest- Overrides:
isAsyncSupportedin classjakarta.servlet.ServletRequestWrapper
-
isSecure
public boolean isSecure()
Description copied from interface:AtmosphereRequest- Specified by:
isSecurein interfaceAtmosphereRequest- Specified by:
isSecurein interfacejakarta.servlet.ServletRequest- Overrides:
isSecurein classjakarta.servlet.ServletRequestWrapper
-
getLocalName
public java.lang.String getLocalName()
Description copied from interface:AtmosphereRequest- Specified by:
getLocalNamein interfaceAtmosphereRequest- Specified by:
getLocalNamein interfacejakarta.servlet.ServletRequest- Overrides:
getLocalNamein classjakarta.servlet.ServletRequestWrapper
-
getLocalPort
public int getLocalPort()
Description copied from interface:AtmosphereRequest- Specified by:
getLocalPortin interfaceAtmosphereRequest- Specified by:
getLocalPortin interfacejakarta.servlet.ServletRequest- Overrides:
getLocalPortin classjakarta.servlet.ServletRequestWrapper
-
getLocalAddr
public java.lang.String getLocalAddr()
Description copied from interface:AtmosphereRequest- Specified by:
getLocalAddrin interfaceAtmosphereRequest- Specified by:
getLocalAddrin interfacejakarta.servlet.ServletRequest- Overrides:
getLocalAddrin classjakarta.servlet.ServletRequestWrapper
-
getLocale
public java.util.Locale getLocale()
Description copied from interface:AtmosphereRequest- Specified by:
getLocalein interfaceAtmosphereRequest- Specified by:
getLocalein interfacejakarta.servlet.ServletRequest- Overrides:
getLocalein classjakarta.servlet.ServletRequestWrapper
-
resource
public AtmosphereResource resource()
Description copied from interface:AtmosphereRequestTheAtmosphereResourceassociated with this request.- Specified by:
resourcein interfaceAtmosphereRequest- Returns:
- an
AtmosphereResource
-
getLocales
public java.util.Enumeration<java.util.Locale> getLocales()
Description copied from interface:AtmosphereRequest- Specified by:
getLocalesin interfaceAtmosphereRequest- Specified by:
getLocalesin interfacejakarta.servlet.ServletRequest- Overrides:
getLocalesin classjakarta.servlet.ServletRequestWrapper
-
dispatchRequestAsynchronously
public boolean dispatchRequestAsynchronously()
Description copied from interface:AtmosphereRequestDispatch the request asynchronously to container. The default is false.- Specified by:
dispatchRequestAsynchronouslyin interfaceAtmosphereRequest- Returns:
- true to dispatch the request asynchronously to container.
-
isDestroyable
public boolean isDestroyable()
Description copied from interface:AtmosphereRequestCjeck if this object can be destroyed. Default is true.- Specified by:
isDestroyablein interfaceAtmosphereRequest
-
pathInfo
public AtmosphereRequest pathInfo(java.lang.String pathInfo)
- Specified by:
pathInfoin interfaceAtmosphereRequest
-
getAttributeNames
public java.util.Enumeration<java.lang.String> getAttributeNames()
Description copied from interface:AtmosphereRequest- Specified by:
getAttributeNamesin interfaceAtmosphereRequest- Specified by:
getAttributeNamesin interfacejakarta.servlet.ServletRequest- Overrides:
getAttributeNamesin classjakarta.servlet.ServletRequestWrapper
-
localAttributes
public AtmosphereRequest.LocalAttributes localAttributes()
Description copied from interface:AtmosphereRequestReturn 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.- Specified by:
localAttributesin interfaceAtmosphereRequest- Returns:
- a
-
getCharacterEncoding
public java.lang.String getCharacterEncoding()
Description copied from interface:AtmosphereRequest- Specified by:
getCharacterEncodingin interfaceAtmosphereRequest- Specified by:
getCharacterEncodingin interfacejakarta.servlet.ServletRequest- Overrides:
getCharacterEncodingin classjakarta.servlet.ServletRequestWrapper
-
getContentLength
public int getContentLength()
Description copied from interface:AtmosphereRequest- Specified by:
getContentLengthin interfaceAtmosphereRequest- Specified by:
getContentLengthin interfacejakarta.servlet.ServletRequest- Overrides:
getContentLengthin classjakarta.servlet.ServletRequestWrapper
-
uuid
public java.lang.String uuid()
Description copied from interface:AtmosphereRequestReturn the underlyingAtmosphereResource.uuid(). May return "0" if noAtmosphereResourceis associated with this object.- Specified by:
uuidin interfaceAtmosphereRequest- Returns:
- the underlying
AtmosphereResource.uuid()
-
destroy
public void destroy()
- Specified by:
destroyin interfaceAtmosphereRequest
-
destroy
public void destroy(boolean force)
- Specified by:
destroyin interfaceAtmosphereRequest
-
setRequest
public void setRequest(jakarta.servlet.ServletRequest request)
Description copied from interface:AtmosphereRequest- Specified by:
setRequestin interfaceAtmosphereRequest- Overrides:
setRequestin classjakarta.servlet.ServletRequestWrapper
-
newInstance
public static AtmosphereRequest newInstance()
Create an instance of this class without an associatedHttpServletRequest.- Returns:
- an instance of this class without an associated
HttpServletRequest
-
wrap
public static AtmosphereRequest wrap(jakarta.servlet.http.HttpServletRequest request)
Wrap anHttpServletRequest.- Parameters:
request-HttpServletRequest- Returns:
- an
AtmosphereRequest
-
cloneRequest
public static AtmosphereRequest cloneRequest(jakarta.servlet.http.HttpServletRequest request, boolean loadInMemory, boolean copySession, boolean isDestroyable, boolean createSession)
Copy the HttpServletRequest content inside an AtmosphereRequest. By default the returned AtmosphereRequest is not destroyable.- Parameters:
request-HttpServletRequest- Returns:
- an
AtmosphereRequest
-
toString
public java.lang.String toString()
- Specified by:
toStringin interfaceAtmosphereRequest- Overrides:
toStringin classjava.lang.Object
-
requestURL
public java.lang.String requestURL()
- Specified by:
requestURLin interfaceAtmosphereRequest
-
-