Interface AtmosphereRequest

  • All Superinterfaces:
    jakarta.servlet.http.HttpServletRequest, jakarta.servlet.ServletRequest
    All Known Implementing Classes:
    AtmosphereRequestImpl

    public interface AtmosphereRequest
    extends jakarta.servlet.http.HttpServletRequest
    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.
    Author:
    Jeanfrancois Arcand
    • Method Detail

      • destroyed

        boolean destroyed()
      • getPathInfo

        java.lang.String getPathInfo()
        Specified by:
        getPathInfo in interface jakarta.servlet.http.HttpServletRequest
      • getPathTranslated

        java.lang.String getPathTranslated()
        Specified by:
        getPathTranslated in interface jakarta.servlet.http.HttpServletRequest
      • getQueryString

        java.lang.String getQueryString()
        Specified by:
        getQueryString in interface jakarta.servlet.http.HttpServletRequest
      • getRemoteUser

        java.lang.String getRemoteUser()
        Specified by:
        getRemoteUser in interface jakarta.servlet.http.HttpServletRequest
      • getRequestedSessionId

        java.lang.String getRequestedSessionId()
        Specified by:
        getRequestedSessionId in interface jakarta.servlet.http.HttpServletRequest
      • getMethod

        java.lang.String getMethod()
        Specified by:
        getMethod in interface jakarta.servlet.http.HttpServletRequest
      • getPart

        jakarta.servlet.http.Part getPart​(java.lang.String name)
                                   throws java.io.IOException,
                                          jakarta.servlet.ServletException
        Specified by:
        getPart in interface jakarta.servlet.http.HttpServletRequest
        Throws:
        java.io.IOException
        jakarta.servlet.ServletException
      • getParts

        java.util.Collection<jakarta.servlet.http.Part> getParts()
                                                          throws java.io.IOException,
                                                                 jakarta.servlet.ServletException
        Specified by:
        getParts in interface jakarta.servlet.http.HttpServletRequest
        Throws:
        java.io.IOException
        jakarta.servlet.ServletException
      • getContentType

        java.lang.String getContentType()
        Specified by:
        getContentType in interface jakarta.servlet.ServletRequest
      • getDispatcherType

        jakarta.servlet.DispatcherType getDispatcherType()
        Specified by:
        getDispatcherType in interface jakarta.servlet.ServletRequest
      • getServletPath

        java.lang.String getServletPath()
        Specified by:
        getServletPath in interface jakarta.servlet.http.HttpServletRequest
      • getRequestURI

        java.lang.String getRequestURI()
        Specified by:
        getRequestURI in interface jakarta.servlet.http.HttpServletRequest
      • getRequestURL

        java.lang.StringBuffer getRequestURL()
        Specified by:
        getRequestURL in interface jakarta.servlet.http.HttpServletRequest
      • getHeaders

        java.util.Enumeration getHeaders​(java.lang.String name)
        Specified by:
        getHeaders in interface jakarta.servlet.http.HttpServletRequest
      • getIntHeader

        int getIntHeader​(java.lang.String name)
        Specified by:
        getIntHeader in interface jakarta.servlet.http.HttpServletRequest
      • getHeaderNames

        java.util.Enumeration<java.lang.String> getHeaderNames()
        Specified by:
        getHeaderNames in interface jakarta.servlet.http.HttpServletRequest
      • authenticate

        boolean authenticate​(jakarta.servlet.http.HttpServletResponse response)
                      throws java.io.IOException,
                             jakarta.servlet.ServletException
        Specified by:
        authenticate in interface jakarta.servlet.http.HttpServletRequest
        Throws:
        java.io.IOException
        jakarta.servlet.ServletException
      • getAuthType

        java.lang.String getAuthType()
        Specified by:
        getAuthType in interface jakarta.servlet.http.HttpServletRequest
      • getContextPath

        java.lang.String getContextPath()
        Specified by:
        getContextPath in interface jakarta.servlet.http.HttpServletRequest
      • getCookies

        jakarta.servlet.http.Cookie[] getCookies()
        Specified by:
        getCookies in interface jakarta.servlet.http.HttpServletRequest
      • getDateHeader

        long getDateHeader​(java.lang.String name)
        Specified by:
        getDateHeader in interface jakarta.servlet.http.HttpServletRequest
      • getHeader

        java.lang.String getHeader​(java.lang.String s)
        Specified by:
        getHeader in interface jakarta.servlet.http.HttpServletRequest
      • wrappedRequest

        jakarta.servlet.http.HttpServletRequest wrappedRequest()
      • getHeader

        java.lang.String getHeader​(java.lang.String s,
                                   boolean checkCase)
      • getParameter

        java.lang.String getParameter​(java.lang.String s)
        Specified by:
        getParameter in interface jakarta.servlet.ServletRequest
      • getParameterMap

        java.util.Map<java.lang.String,​java.lang.String[]> getParameterMap()
        Specified by:
        getParameterMap in interface jakarta.servlet.ServletRequest
      • getParameterNames

        java.util.Enumeration<java.lang.String> getParameterNames()
        Specified by:
        getParameterNames in interface jakarta.servlet.ServletRequest
      • getParameterValues

        java.lang.String[] getParameterValues​(java.lang.String s)
        Specified by:
        getParameterValues in interface jakarta.servlet.ServletRequest
      • getProtocol

        java.lang.String getProtocol()
        Specified by:
        getProtocol in interface jakarta.servlet.ServletRequest
      • getInputStream

        jakarta.servlet.ServletInputStream getInputStream()
                                                   throws java.io.IOException
        Specified by:
        getInputStream in interface jakarta.servlet.ServletRequest
        Throws:
        java.io.IOException
      • getReader

        java.io.BufferedReader getReader()
                                  throws java.io.IOException
        Specified by:
        getReader in interface jakarta.servlet.ServletRequest
        Throws:
        java.io.IOException
      • getRealPath

        java.lang.String getRealPath​(java.lang.String path)
        Specified by:
        getRealPath in interface jakarta.servlet.ServletRequest
      • headers

        AtmosphereRequest headers​(java.util.Map<java.lang.String,​java.lang.String> headers)
        Add all headers contained within the Map.
        Parameters:
        headers -
        Returns:
        this;
      • header

        AtmosphereRequest header​(java.lang.String name,
                                 java.lang.String value)
        Add a header.
        Parameters:
        name -
        value -
        Returns:
        this
      • queryString

        AtmosphereRequest queryString​(java.lang.String qs)
        Set the query string.
        Parameters:
        qs -
        Returns:
        this
      • headersMap

        java.util.Map<java.lang.String,​java.lang.String> headersMap()
      • queryStringsMap

        java.util.Map<java.lang.String,​java.lang.String[]> queryStringsMap()
      • 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;
      • setAttribute

        void setAttribute​(java.lang.String s,
                          java.lang.Object o)
        Specified by:
        setAttribute in interface jakarta.servlet.ServletRequest
      • setCharacterEncoding

        void setCharacterEncoding​(java.lang.String env)
                           throws java.io.UnsupportedEncodingException
        Specified by:
        setCharacterEncoding in interface jakarta.servlet.ServletRequest
        Throws:
        java.io.UnsupportedEncodingException
      • startAsync

        jakarta.servlet.AsyncContext startAsync()
        Specified by:
        startAsync in interface jakarta.servlet.ServletRequest
      • startAsync

        jakarta.servlet.AsyncContext startAsync​(jakarta.servlet.ServletRequest request,
                                                jakarta.servlet.ServletResponse response)
        Specified by:
        startAsync in interface jakarta.servlet.ServletRequest
      • getAsyncContext

        jakarta.servlet.AsyncContext getAsyncContext()
        Specified by:
        getAsyncContext in interface jakarta.servlet.ServletRequest
      • getAttribute

        java.lang.Object getAttribute​(java.lang.String s)
        Specified by:
        getAttribute in interface jakarta.servlet.ServletRequest
      • removeAttribute

        void removeAttribute​(java.lang.String name)
        Specified by:
        removeAttribute in interface jakarta.servlet.ServletRequest
      • getSession

        jakarta.servlet.http.HttpSession getSession()
        Specified by:
        getSession in interface jakarta.servlet.http.HttpServletRequest
      • getSession

        jakarta.servlet.http.HttpSession getSession​(boolean create)
        Specified by:
        getSession in interface jakarta.servlet.http.HttpServletRequest
      • getUserPrincipal

        java.security.Principal getUserPrincipal()
        Specified by:
        getUserPrincipal in interface jakarta.servlet.http.HttpServletRequest
      • isRequestedSessionIdFromCookie

        boolean isRequestedSessionIdFromCookie()
        Specified by:
        isRequestedSessionIdFromCookie in interface jakarta.servlet.http.HttpServletRequest
      • isRequestedSessionIdFromUrl

        boolean isRequestedSessionIdFromUrl()
        Specified by:
        isRequestedSessionIdFromUrl in interface jakarta.servlet.http.HttpServletRequest
      • isRequestedSessionIdFromURL

        boolean isRequestedSessionIdFromURL()
        Specified by:
        isRequestedSessionIdFromURL in interface jakarta.servlet.http.HttpServletRequest
      • isRequestedSessionIdValid

        boolean isRequestedSessionIdValid()
        Specified by:
        isRequestedSessionIdValid in interface jakarta.servlet.http.HttpServletRequest
      • isUserInRole

        boolean isUserInRole​(java.lang.String role)
        Specified by:
        isUserInRole in interface jakarta.servlet.http.HttpServletRequest
      • login

        void login​(java.lang.String username,
                   java.lang.String password)
            throws jakarta.servlet.ServletException
        Specified by:
        login in interface jakarta.servlet.http.HttpServletRequest
        Throws:
        jakarta.servlet.ServletException
      • logout

        void logout()
             throws jakarta.servlet.ServletException
        Specified by:
        logout in interface jakarta.servlet.http.HttpServletRequest
        Throws:
        jakarta.servlet.ServletException
      • getRemoteAddr

        java.lang.String getRemoteAddr()
        Specified by:
        getRemoteAddr in interface jakarta.servlet.ServletRequest
      • getRemoteHost

        java.lang.String getRemoteHost()
        Specified by:
        getRemoteHost in interface jakarta.servlet.ServletRequest
      • getRemotePort

        int getRemotePort()
        Specified by:
        getRemotePort in interface jakarta.servlet.ServletRequest
      • getRequestDispatcher

        jakarta.servlet.RequestDispatcher getRequestDispatcher​(java.lang.String path)
        Specified by:
        getRequestDispatcher in interface jakarta.servlet.ServletRequest
      • getScheme

        java.lang.String getScheme()
        Specified by:
        getScheme in interface jakarta.servlet.ServletRequest
      • getServerName

        java.lang.String getServerName()
        Specified by:
        getServerName in interface jakarta.servlet.ServletRequest
      • getServerPort

        int getServerPort()
        Specified by:
        getServerPort in interface jakarta.servlet.ServletRequest
      • getServletContext

        jakarta.servlet.ServletContext getServletContext()
        Specified by:
        getServletContext in interface jakarta.servlet.ServletRequest
      • isAsyncStarted

        boolean isAsyncStarted()
        Specified by:
        isAsyncStarted in interface jakarta.servlet.ServletRequest
      • isAsyncSupported

        boolean isAsyncSupported()
        Specified by:
        isAsyncSupported in interface jakarta.servlet.ServletRequest
      • isSecure

        boolean isSecure()
        Specified by:
        isSecure in interface jakarta.servlet.ServletRequest
      • getLocalName

        java.lang.String getLocalName()
        Specified by:
        getLocalName in interface jakarta.servlet.ServletRequest
      • getLocalPort

        int getLocalPort()
        Specified by:
        getLocalPort in interface jakarta.servlet.ServletRequest
      • getLocalAddr

        java.lang.String getLocalAddr()
        Specified by:
        getLocalAddr in interface jakarta.servlet.ServletRequest
      • getLocale

        java.util.Locale getLocale()
        Specified by:
        getLocale in interface jakarta.servlet.ServletRequest
      • getLocales

        java.util.Enumeration<java.util.Locale> getLocales()
        Specified by:
        getLocales in interface jakarta.servlet.ServletRequest
      • 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()
        Cjeck if this object can be destroyed. Default is true.
      • getAttributeNames

        java.util.Enumeration<java.lang.String> getAttributeNames()
        Specified by:
        getAttributeNames in interface jakarta.servlet.ServletRequest
      • 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
      • getCharacterEncoding

        java.lang.String getCharacterEncoding()
        Specified by:
        getCharacterEncoding in interface jakarta.servlet.ServletRequest
      • getContentLength

        int getContentLength()
        Specified by:
        getContentLength in interface jakarta.servlet.ServletRequest
      • destroy

        void destroy()
      • destroy

        void destroy​(boolean force)
      • setRequest

        void setRequest​(jakarta.servlet.ServletRequest request)
      • toString

        java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • requestURL

        java.lang.String requestURL()