Class SessionCookieConfigImpl

  • All Implemented Interfaces:
    SessionConfig, javax.servlet.SessionCookieConfig

    public class SessionCookieConfigImpl
    extends Object
    implements javax.servlet.SessionCookieConfig, SessionConfig
    Author:
    Stuart Douglas
    • Constructor Detail

      • SessionCookieConfigImpl

        public SessionCookieConfigImpl​(ServletContextImpl servletContext)
    • Method Detail

      • setSessionId

        public void setSessionId​(HttpServerExchange exchange,
                                 String sessionId)
        Description copied from interface: SessionConfig
        Attaches the session to the exchange. The method should attach the exchange under an attachment key, and should also modify the exchange to allow the session to be re-attached on the next request.

        Generally this will involve setting a cookie

        Once a session has been attached it must be possible to retrieve it via SessionConfig.findSessionId(io.undertow.server.HttpServerExchange)

        Specified by:
        setSessionId in interface SessionConfig
        Parameters:
        exchange - The exchange
        sessionId - The session
      • clearSession

        public void clearSession​(HttpServerExchange exchange,
                                 String sessionId)
        Description copied from interface: SessionConfig
        Clears this session from the exchange, removing the attachment and making any changes to the response necessary, such as clearing cookies.
        Specified by:
        clearSession in interface SessionConfig
        Parameters:
        exchange - The exchange
        sessionId - The session id
      • findSessionId

        public String findSessionId​(HttpServerExchange exchange)
        Description copied from interface: SessionConfig
        Retrieves a session id of an existing session from an exchange.
        Specified by:
        findSessionId in interface SessionConfig
        Parameters:
        exchange - The exchange
        Returns:
        The session id, or null
      • getName

        public String getName()
        Specified by:
        getName in interface javax.servlet.SessionCookieConfig
      • setName

        public void setName​(String name)
        Specified by:
        setName in interface javax.servlet.SessionCookieConfig
      • getDomain

        public String getDomain()
        Specified by:
        getDomain in interface javax.servlet.SessionCookieConfig
      • setDomain

        public void setDomain​(String domain)
        Specified by:
        setDomain in interface javax.servlet.SessionCookieConfig
      • getPath

        public String getPath()
        Specified by:
        getPath in interface javax.servlet.SessionCookieConfig
      • setPath

        public void setPath​(String path)
        Specified by:
        setPath in interface javax.servlet.SessionCookieConfig
      • getComment

        public String getComment()
        Specified by:
        getComment in interface javax.servlet.SessionCookieConfig
      • setComment

        public void setComment​(String comment)
        Specified by:
        setComment in interface javax.servlet.SessionCookieConfig
      • isHttpOnly

        public boolean isHttpOnly()
        Specified by:
        isHttpOnly in interface javax.servlet.SessionCookieConfig
      • setHttpOnly

        public void setHttpOnly​(boolean httpOnly)
        Specified by:
        setHttpOnly in interface javax.servlet.SessionCookieConfig
      • isSecure

        public boolean isSecure()
        Specified by:
        isSecure in interface javax.servlet.SessionCookieConfig
      • setSecure

        public void setSecure​(boolean secure)
        Specified by:
        setSecure in interface javax.servlet.SessionCookieConfig
      • getMaxAge

        public int getMaxAge()
        Specified by:
        getMaxAge in interface javax.servlet.SessionCookieConfig
      • setMaxAge

        public void setMaxAge​(int maxAge)
        Specified by:
        setMaxAge in interface javax.servlet.SessionCookieConfig
      • setFallback

        public void setFallback​(SessionConfig fallback)