Class Request


  • public class Request
    extends Object
    Wrapper object for the Coyote request.
    Version:
    $Revision: 1.2 $ $Date: 2007/03/14 02:15:42 $
    Author:
    Remy Maucherat, Craig R. McClanahan
    • Field Detail

      • SEND_FILE_ENABLED_ATTR

        public static final String SEND_FILE_ENABLED_ATTR
        Request attribute will be associated with a boolean value indicating whether or not it's possible to transfer a File using sendfile.
        Since:
        2.2
        See Also:
        Constant Field Values
      • SEND_FILE_ATTR

        public static final String SEND_FILE_ATTR

        The value of this request attribute, as set by the developer must be a File that exists, is not a directory, and is readable. This File will be transferred using sendfile if SEND_FILE_ENABLED_ATTR is true. If sendfile support isn't enabled, an IllegalStateException will be raised at runtime. The HttpHandler using this functionality should refrain from writing content via the response.

        Note that once this attribute is set, the sendfile process will begin.

        Since:
        2.2
        See Also:
        Constant Field Values
      • SEND_FILE_START_OFFSET_ATTR

        public static final String SEND_FILE_START_OFFSET_ATTR

        The value of this request attribute signifies the starting offset of the file transfer. If not specified, an offset of zero will be assumed. The type of the value must be Long.

        NOTE: In order for this attribute to take effect, it must be set before the SEND_FILE_ATTR is set.

        Since:
        2.2
        See Also:
        Constant Field Values
      • SEND_FILE_WRITE_LEN_ATTR

        public static final String SEND_FILE_WRITE_LEN_ATTR

        The value of this request attribute signifies the total number of bytes to transfer. If not specified, the entire file will be transferred. The type of the value must be Long

        NOTE: In order for this attribute to take effect, it must be set before the SEND_FILE_ATTR is set.

        Since:
        2.2
        See Also:
        Constant Field Values
      • request

        protected org.glassfish.grizzly.http.HttpRequestPacket request
        HTTP Request Packet
      • ctx

        protected org.glassfish.grizzly.filterchain.FilterChainContext ctx
      • cookies

        protected org.glassfish.grizzly.http.Cookie[] cookies
        The set of cookies associated with this Request.
      • rawCookies

        protected org.glassfish.grizzly.http.Cookies rawCookies
      • sessionCookieName

        protected String sessionCookieName
      • defaultLocale

        protected static final Locale defaultLocale
        The default Locale if none are specified.
      • locales

        protected final ArrayList<Locale> locales
        The preferred Locales associated with this Request.
      • dispatcherType

        protected Object dispatcherType
        The current dispatcher type.
      • inputBuffer

        protected final ServerInputBuffer inputBuffer
        The associated input buffer.
      • usingInputStream

        protected boolean usingInputStream
        Using stream flag.
      • usingReader

        protected boolean usingReader
        Using writer flag.
      • userPrincipal

        protected Principal userPrincipal
        User principal.
      • sessionParsed

        protected boolean sessionParsed
        Session parsed flag.
      • requestParametersParsed

        protected boolean requestParametersParsed
        Request parameters parsed flag.
      • cookiesParsed

        protected boolean cookiesParsed
        Cookies parsed flag.
      • secure

        protected boolean secure
        Secure flag.
      • subject

        protected Subject subject
        The Subject associated with the current AccessControllerContext
      • parameterMap

        protected final ParameterMap parameterMap
        Hash map used in the getParametersMap method.
      • parameters

        protected final org.glassfish.grizzly.http.util.Parameters parameters
      • requestDispatcherPath

        protected Object requestDispatcherPath
        The current request dispatcher path.
      • requestedSessionCookie

        protected boolean requestedSessionCookie
        Was the requested session ID received in a cookie?
      • requestedSessionId

        protected String requestedSessionId
        The requested session ID (if any) for this request.
      • requestedSessionURL

        protected boolean requestedSessionURL
        Was the requested session ID received in a URL?
      • localesParsed

        protected boolean localesParsed
        Parse locales.
      • response

        protected final Response response
        The response with which this request is associated.
      • trailers

        protected Map<String,​String> trailers
        Trailer headers, if any.
    • Constructor Detail

      • Request

        @Deprecated
        public Request()
        Deprecated.
        Temporarily introduce public constructor to fix GRIZZLY-1782. Just to make request instances proxiable. This constructor is not intended for client code consumption and should not be used explicitly as it creates an invalid instance.
      • Request

        protected Request​(Response response)
    • Method Detail

      • create

        public static Request create()
      • obtainMappingData

        public final MappingData obtainMappingData()
      • initialize

        public void initialize​(org.glassfish.grizzly.http.HttpRequestPacket request,
                               org.glassfish.grizzly.filterchain.FilterChainContext ctx,
                               HttpServerFilter httpServerFilter)
      • getRequest

        public org.glassfish.grizzly.http.HttpRequestPacket getRequest()
        Returns:
        the Coyote request.
      • getResponse

        public Response getResponse()
        Returns:
        the Response with which this Request is associated.
      • getSessionCookieName

        public String getSessionCookieName()
        Returns:
        session cookie name, if not set default JSESSIONID name will be used
      • setSessionCookieName

        public void setSessionCookieName​(String sessionCookieName)
        Set the session cookie name, if not set default JSESSIONID name will be used
      • isPushEnabled

        public boolean isPushEnabled()
        Returns:
        true if HTTP/2 push is enabled, otherwise, false.
      • getRequestExecutor

        public Executor getRequestExecutor()
        Returns:
        the Executor responsible for notifying ReadHandler, WriteHandler associated with this Request processing.
      • addAfterServiceListener

        public void addAfterServiceListener​(AfterServiceListener listener)
        Add the listener, which will be notified, once Request processing will be finished.
        Parameters:
        listener - the listener, which will be notified, once Request processing will be finished.
      • onAfterService

        protected void onAfterService()
      • recycle

        protected void recycle()
        Release all object references, and initialize instance variables, in preparation for reuse of this object.
      • getAuthorization

        public String getAuthorization()
        Returns:
        the authorization credentials sent with this request.
      • newPushBuilder

        public PushBuilder newPushBuilder()
        Returns:
        a new PushBuilder for issuing server push responses from the current request. If the current connection does not support server push, or server push has been disabled by the client, it will return null.
      • replayPayload

        public void replayPayload​(org.glassfish.grizzly.Buffer buffer)
        Replays request's payload by setting new payload Buffer. If request parameters have been parsed based on prev. request's POST payload - the parameters will be recycled and ready to be parsed again.
        Parameters:
        buffer - payload
      • createInputStream

        public org.glassfish.grizzly.http.io.NIOInputStream createInputStream()
        Create and return a NIOInputStream to read the content associated with this Request.
        Returns:
        NIOInputStream
      • createNote

        public static <E> org.glassfish.grizzly.http.Note<E> createNote​(String name)
        Create a named Note associated with this Request.
        Type Parameters:
        E - the Note type.
        Parameters:
        name - the Note name.
        Returns:
        the Note.
      • getNote

        public <E> E getNote​(org.glassfish.grizzly.http.Note<E> note)
        Return the Note value associated with this Request, or null if no such binding exists. Use createNote(java.lang.String) to create a new Note.
        Parameters:
        note - Note value to be returned
      • getNoteNames

        public Set<String> getNoteNames()
        Return a Set containing the String names of all note bindings that exist for this request. Use createNote(java.lang.String) to create a new Note.
        Returns:
        a Set containing the String names of all note bindings that exist for this request.
      • removeNote

        public <E> E removeNote​(org.glassfish.grizzly.http.Note<E> note)
        Remove the Note value associated with this request. Use createNote(java.lang.String) to create a new Note.
        Parameters:
        note - Note value to be removed
      • setNote

        public <E> void setNote​(org.glassfish.grizzly.http.Note<E> note,
                                E value)
        Bind the Note value to this Request, replacing any existing binding for this name. Use createNote(java.lang.String) to create a new Note.
        Parameters:
        note - Note to which the object should be bound
        value - the Note value be bound to the specified Note.
      • setServerName

        public void setServerName​(String name)
        Set the name of the server (virtual host) to process this request.
        Parameters:
        name - The server name
      • setServerPort

        public void setServerPort​(int port)
        Set the port number of the server to process this request.
        Parameters:
        port - The server port
      • getContextPath

        public String getContextPath()
        Returns the portion of the request URI that indicates the context of the request. The context path always comes first in a request URI. The path starts with a "/" character but does not end with a "/" character. For HttpHandlers in the default (root) context, this method returns "". The container does not decode this string.
        Returns:
        a String specifying the portion of the request URI that indicates the context of the request
      • setContextPath

        protected void setContextPath​(String contextPath)
      • getHttpHandlerPath

        public String getHttpHandlerPath()
        Returns the part of this request's URL that calls the HttpHandler. This includes either the HttpHandler name or a path to the HttpHandler, but does not include any extra path information or a query string.
        Returns:
        a String containing the name or path of the HttpHandler being called, as specified in the request URL
        Throws:
        IllegalStateException - if HttpHandler path was not set explicitly and attempt to URI-decode RequestURIRef.getDecodedURI() failed.
      • setHttpHandlerPath

        protected void setHttpHandlerPath​(String httpHandlerPath)
      • getPathInfo

        public String getPathInfo()
        Returns any extra path information associated with the URL the client sent when it made this request. The extra path information follows the HttpHandler path but precedes the query string. This method returns null if there was no extra path information.
        Returns:
        a String specifying extra path information that comes after the HttpHandler path but before the query string in the request URL; or null if the URL does not have any extra path information
      • setPathInfo

        protected void setPathInfo​(String pathInfo)
      • getAttribute

        public Object getAttribute​(String name)
        Return the specified request attribute if it exists; otherwise, return null.
        Parameters:
        name - Name of the request attribute to return
        Returns:
        the specified request attribute if it exists; otherwise, return null.
      • getAttributeNames

        public Set<String> getAttributeNames()
        Return the names of all request attributes for this Request, or an empty Set if there are none.
      • getCharacterEncoding

        public String getCharacterEncoding()
        Return the character encoding for this Request.
      • getContentLength

        public int getContentLength()
        Return the content length for this Request.
      • getContentLengthLong

        public long getContentLengthLong()
        Return the content length for this Request represented by Java long type.
      • getContentType

        public String getContentType()
        Return the content type for this Request.
      • getNIOInputStream

        public org.glassfish.grizzly.http.io.NIOInputStream getNIOInputStream()

        Return the NIOInputStream for this Request. This stream will not block when reading content.

        NOTE: For now, in order to use non-blocking functionality, this method must be invoked before the HttpHandler.service(Request, Response) method returns. We hope to have this addressed in the next release.

        Returns:
        the NIOInputStream for this Request.
        Throws:
        IllegalStateException - if getReader() or getNIOReader() has already been called for this request.
      • requiresAcknowledgement

        public boolean requiresAcknowledgement()
        Returns:
        true if this request requires acknowledgment.
      • getLocale

        public Locale getLocale()
        Return the preferred Locale that the client will accept content in, based on the value for the first Accept-Language header that was encountered. If the request did not specify a preferred language, the server's default Locale is returned.
      • getLocales

        public List<Locale> getLocales()
        Return the set of preferred Locales that the client will accept content in, based on the values for any Accept-Language headers that were encountered. If the request did not specify a preferred language, the server's default Locale is returned.
      • getParameters

        public org.glassfish.grizzly.http.util.Parameters getParameters()
        Returns the low-level parameters holder for finer control over parameters.
        Returns:
        Parameters.
      • getParameter

        public String getParameter​(String name)
        Return the value of the specified request parameter, if any; otherwise, return null. If there is more than one value defined, return only the first one.
        Parameters:
        name - Name of the desired request parameter
      • getParameterMap

        public Map<String,​String[]> getParameterMap()
        Returns a Map of the parameters of this request. Request parameters are extra information sent with the request. For HTTP servlets, parameters are contained in the query string or posted form data.
        Returns:
        A Map containing parameter names as keys and parameter values as map values.
      • getParameterNames

        public Set<String> getParameterNames()
        Return the names of all defined request parameters for this request.
      • getParameterValues

        public String[] getParameterValues​(String name)
        Return the defined values for the specified request parameter, if any; otherwise, return null.
        Parameters:
        name - Name of the desired request parameter
      • getProtocol

        public org.glassfish.grizzly.http.Protocol getProtocol()
        Return the protocol and version used to make this Request.
      • getReader

        public Reader getReader()

        Returns the Reader associated with this Request.

        By default the returned NIOReader will work as blocking Reader, but it will be possible to call InputSource.isReady() or InputSource.notifyAvailable(org.glassfish.grizzly.ReadHandler) to avoid blocking.
        Returns:
        the NIOReader associated with this Request.
        Throws:
        IllegalStateException - if getInputStream() or getNIOInputStream() has already been called for this request.
        Since:
        2.2
      • getNIOReader

        public org.glassfish.grizzly.http.io.NIOReader getNIOReader()

        Returns the NIOReader associated with this Request. This NIOReader will not block while reading content.

        Returns:
        NIOReader
        Throws:
        IllegalStateException - if getInputStream() or getNIOInputStream() has already been called for this request.
      • getRemoteAddr

        public String getRemoteAddr()
        Return the remote IP address making this Request.
      • getRemoteHost

        public String getRemoteHost()
        Return the remote host name making this Request.
      • getRemotePort

        public int getRemotePort()
        Returns the Internet Protocol (IP) source port of the client or last proxy that sent the request.
      • getLocalName

        public String getLocalName()
        Returns the host name of the Internet Protocol (IP) interface on which the request was received.
      • getLocalAddr

        public String getLocalAddr()
        Returns the Internet Protocol (IP) address of the interface on which the request was received.
      • getLocalPort

        public int getLocalPort()
        Returns the Internet Protocol (IP) port number of the interface on which the request was received.
      • getScheme

        public String getScheme()
        Returns:
        the scheme used to make this Request.
      • getServerName

        public String getServerName()
        Returns:
        the server name responding to this Request.
      • getServerPort

        public int getServerPort()
        Returns:
        the server port responding to this Request.
      • isSecure

        public boolean isSecure()
        Returns:
        true if this request received on a secure connection
      • removeAttribute

        public void removeAttribute​(String name)
        Remove the specified request attribute if it exists.
        Parameters:
        name - Name of the request attribute to remove
      • setAttribute

        public void setAttribute​(String name,
                                 Object value)
        Set the specified request attribute to the specified value.
        Parameters:
        name - Name of the request attribute to set
        value - The associated value
      • setCharacterEncoding

        public void setCharacterEncoding​(String encoding)
                                  throws UnsupportedEncodingException
        Overrides the name of the character encoding used in the body of this request. This method must be called prior to reading request parameters or reading input using getReader(). Otherwise, it has no effect.
        Parameters:
        encoding - String containing the name of the character encoding.
        Throws:
        UnsupportedEncodingException - if this ServletRequest is still in a state where a character encoding may be set, but the specified encoding is invalid
        Since:
        Servlet 2.3
      • setMaxDispatchDepth

        public static void setMaxDispatchDepth​(int depth)
        Static setter method for the maximum dispatch depth
      • getMaxDispatchDepth

        public static int getMaxDispatchDepth()
      • incrementDispatchDepth

        public int incrementDispatchDepth()
        Increment the depth of application dispatch
      • decrementDispatchDepth

        public int decrementDispatchDepth()
        Decrement the depth of application dispatch
      • isMaxDispatchDepthReached

        public boolean isMaxDispatchDepthReached()
        Check if the application dispatching has reached the maximum
      • getRequestId

        public String getRequestId()
        Returns:
        identifier of the request generated by this class.
      • getProtocolRequestId

        public String getProtocolRequestId()
        Returns:
        an empty string or identifier managed by the underlying protocol (HTTP2)
      • getConnection

        public org.glassfish.grizzly.Connection<?> getConnection()
        Returns:
        underlying connection used by the request
      • addCookie

        public void addCookie​(org.glassfish.grizzly.http.Cookie cookie)
        Add a Cookie to the set of Cookies associated with this Request.
        Parameters:
        cookie - The new cookie
      • addLocale

        public void addLocale​(Locale locale)
        Add a Locale to the set of preferred Locales for this Request. The first added Locale will be the first one returned by getLocales().
        Parameters:
        locale - The new preferred Locale
      • addParameter

        public void addParameter​(String name,
                                 String[] values)
        Add a parameter name and corresponding set of values to this Request. (This is used when restoring the original request on a form based login).
        Parameters:
        name - Name of this request parameter
        values - Corresponding values for this request parameter
      • clearCookies

        public void clearCookies()
        Clear the collection of Cookies associated with this Request.
      • clearHeaders

        public void clearHeaders()
        Clear the collection of Headers associated with this Request.
      • clearLocales

        public void clearLocales()
        Clear the collection of Locales associated with this Request.
      • clearParameters

        public void clearParameters()
        Clear the collection of parameters associated with this Request.
      • setUserPrincipal

        public void setUserPrincipal​(Principal principal)
        Set the Principal who has been authenticated for this Request. This value is also used to calculate the value to be returned by the getRemoteUser() method.
        Parameters:
        principal - The user Principal
      • getAuthType

        public String getAuthType()
        Return the authentication type used for this Request.
      • getCookies

        public org.glassfish.grizzly.http.Cookie[] getCookies()
        Return the set of Cookies received with this Request.
      • setCookies

        public void setCookies​(org.glassfish.grizzly.http.Cookie[] cookies)
        Set the set of cookies received with this Request.
      • getDateHeader

        public long getDateHeader​(String name)
        Return the value of the specified date header, if any; otherwise return -1.
        Parameters:
        name - Name of the requested date header
        Throws:
        IllegalArgumentException - if the specified header value cannot be converted to a date
      • getDateHeader

        public long getDateHeader​(org.glassfish.grizzly.http.util.Header header)
        Return the value of the specified date header, if any; otherwise return -1.
        Parameters:
        header - the requested date Header
        Throws:
        IllegalArgumentException - if the specified header value cannot be converted to a date
        Since:
        2.1.2
      • getHeader

        public String getHeader​(String name)
        Return the first value of the specified header, if any; otherwise, return null
        Parameters:
        name - Name of the requested header
      • getHeader

        public String getHeader​(org.glassfish.grizzly.http.util.Header header)
        Return the first value of the specified header, if any; otherwise, return null
        Parameters:
        header - the requested Header
        Since:
        2.1.2
      • getHeaders

        public Iterable<String> getHeaders​(String name)
        Return all of the values of the specified header, if any; otherwise, return an empty enumeration.
        Parameters:
        name - Name of the requested header
      • getHeaders

        public Iterable<String> getHeaders​(org.glassfish.grizzly.http.util.Header header)
        Return all of the values of the specified header, if any; otherwise, return an empty enumeration.
        Parameters:
        header - the requested Header
        Since:
        2.1.2
      • getTrailers

        public Map<String,​String> getTrailers()
        Get the request trailer headers. Values may only be returned in the case of HTTP/1.1 when the request is using the transfer-encoding chunked or in HTTP/2 sends a second HEADERS frame terminating the stream. An empty Map will be returned in all other cases. While headers are typical case insensitive, the headers stored in the returned Map will be done so in lower-case. This method should typically be called after the application has read the request body. It is safe to invoke this method if there is no body content.
        Returns:
        A Map of trailers headers, if any were present.
        Throws:
        IllegalStateException - if neither ReadHandler.onAllDataRead() has been called or an EOF indication has been returned from the getReader(), getNIOReader(), getInputStream(), getNIOInputStream().
        Since:
        2.4.0
        See Also:
        areTrailersAvailable()
      • areTrailersAvailable

        public boolean areTrailersAvailable()
        Returns:
        true if trailers are available to be accessed otherwise returns false.
        Since:
        2.4.0
      • getHeaderNames

        public Iterable<String> getHeaderNames()
        Return the names of all headers received with this request.
      • getIntHeader

        public int getIntHeader​(String name)
        Return the value of the specified header as an integer, or -1 if there is no such header for this request.
        Parameters:
        name - Name of the requested header
        Throws:
        IllegalArgumentException - if the specified header value cannot be converted to an integer
      • getIntHeader

        public int getIntHeader​(org.glassfish.grizzly.http.util.Header header)
        Return the value of the specified header as an integer, or -1 if there is no such header for this request.
        Parameters:
        header - the requested Header
        Throws:
        IllegalArgumentException - if the specified header value cannot be converted to an integer
        Since:
        2.1.2
      • getMethod

        public org.glassfish.grizzly.http.Method getMethod()
        Return the HTTP request method used in this Request.
      • setMethod

        public void setMethod​(String method)
        Sets the HTTP request method used in this Request.
        Parameters:
        method - the HTTP request method used in this Request.
      • getQueryString

        public String getQueryString()
        Returns:
        the query string associated with this request.
      • setQueryString

        public void setQueryString​(String queryString)
        Sets the query string associated with this request.
        Parameters:
        queryString - the query string associated with this request.
      • getRemoteUser

        public String getRemoteUser()
        Return the name of the remote user that has been authenticated for this Request.
      • getRequestedSessionId

        public String getRequestedSessionId()
        Return the session identifier included in this request, if any.
      • getRequestURI

        public String getRequestURI()
        Return the request URI for this request.
      • setRequestURI

        public void setRequestURI​(String uri)
        Sets the request URI for this request.
        Parameters:
        uri - the request URI for this request.
      • getRequestURL

        public StringBuilder getRequestURL()
        Reconstructs the URL the client used to make the request. The returned URL contains a protocol, server name, port number, and server path, but it does not include query string parameters.

        Because this method returns a StringBuilder, not a String, you can modify the URL easily, for example, to append query parameters.

        This method is useful for creating redirect messages and for reporting errors.

        Returns:
        A StringBuffer object containing the reconstructed URL
      • appendRequestURL

        public static StringBuilder appendRequestURL​(Request request,
                                                     StringBuilder buffer)
        Appends the reconstructed URL the client used to make the request. The appended URL contains a protocol, server name, port number, and server path, but it does not include query string parameters.

        Because this method returns a StringBuilder, not a String, you can modify the URL easily, for example, to append query parameters.

        This method is useful for creating redirect messages and for reporting errors.

        Returns:
        A StringBuilder object containing the appended reconstructed URL
      • appendRequestURL

        public static StringBuffer appendRequestURL​(Request request,
                                                    StringBuffer buffer)
        Appends the reconstructed URL the client used to make the request. The appended URL contains a protocol, server name, port number, and server path, but it does not include query string parameters.

        Because this method returns a StringBuffer, not a String, you can modify the URL easily, for example, to append query parameters.

        This method is useful for creating redirect messages and for reporting errors.

        Returns:
        A StringBuffer object containing the appended reconstructed URL
      • getUserPrincipal

        public Principal getUserPrincipal()
        Return the principal that has been authenticated for this Request.
      • getContext

        public org.glassfish.grizzly.filterchain.FilterChainContext getContext()
      • parseCookies

        protected void parseCookies()
        Parse cookies.
      • setRequestParameters

        public void setRequestParameters​(org.glassfish.grizzly.http.util.Parameters parameters)
        This method may be used if some other entity processed request parameters and wishes to expose them via the request. When this method is called, it will mark the internal request parameter state as having been processed.
        Parameters:
        parameters - the parameters to expose via this request.
        Since:
        2.2
      • getRawCookies

        protected org.glassfish.grizzly.http.Cookies getRawCookies()
        TODO DOCS
      • parseRequestParameters

        protected void parseRequestParameters()
        Parse request parameters.
      • getPostBody

        public org.glassfish.grizzly.Buffer getPostBody​(int len)
                                                 throws IOException
        Gets the POST body of this request.
        Returns:
        The POST body of this request
        Throws:
        IOException
      • skipPostBody

        protected void skipPostBody​(int len)
                             throws IOException
        Skips the POST body of this request.
        Parameters:
        len - how much of the POST body to skip.
        Throws:
        IOException
      • parseLocales

        protected void parseLocales()
        Parse request locales.
      • parseLocalesHeader

        protected void parseLocalesHeader​(String value)
        Parse accept-language header value.
      • getJrouteId

        public String getJrouteId()
        Gets the jroute id of this request, which may have been sent as a separate JROUTE cookie or appended to the session identifier encoded in the URI (if cookies have been disabled).
        Returns:
        The jroute id of this request, or null if this request does not carry any jroute id
      • getSession

        public Session getSession()
        Return the session associated with this Request, creating one if necessary.
      • getSession

        public Session getSession​(boolean create)
        Return the session associated with this Request, creating one if necessary and requested.
        Parameters:
        create - Create a new session if one does not exist
      • changeSessionId

        public String changeSessionId()
        Change the session id of the current session associated with this request and return the new session id.
        Returns:
        the original session id
        Throws:
        IllegalStateException - if there is no session associated with the request
        Since:
        2.3
      • doGetSession

        protected Session doGetSession​(boolean create)
      • isRequestedSessionIdFromCookie

        public boolean isRequestedSessionIdFromCookie()
        Returns:
        true if the session identifier included in this request came from a cookie.
      • isRequestedSessionIdFromURL

        public boolean isRequestedSessionIdFromURL()
        Return true if the session identifier included in this request came from the request URI.
      • isRequestedSessionIdValid

        public boolean isRequestedSessionIdValid()
        Returns:
        true if the session identifier included in this request identifies a valid session.
      • configureSessionCookie

        protected void configureSessionCookie​(org.glassfish.grizzly.http.Cookie cookie)
        Configures the given session cookie.
        Parameters:
        cookie - The session cookie to be configured
      • parseSessionId

        protected void parseSessionId()
        Parse session id in URL.
      • setRequestedSessionCookie

        public void setRequestedSessionCookie​(boolean flag)
        Set a flag indicating whether or not the requested session ID for this request came in through a cookie. This is normally called by the HTTP Connector, when it parses the request headers.
        Parameters:
        flag - The new flag
      • setRequestedSessionId

        public void setRequestedSessionId​(String id)
        Set the requested session ID for this request. This is normally called by the HTTP Connector, when it parses the request headers.
        Parameters:
        id - The new session id
      • setRequestedSessionURL

        public void setRequestedSessionURL​(boolean flag)
        Set a flag indicating whether or not the requested session ID for this request came in through a URL. This is normally called by the HTTP Connector, when it parses the request headers.
        Parameters:
        flag - The new flag