Class OrphanSession

  • All Implemented Interfaces:
    io.undertow.server.session.Session

    public class OrphanSession
    extends Object
    implements io.undertow.server.session.Session
    A session implementation for sessions created after the response is committed. This is a workaround for those applications that trigger creation of a new session after calling javax.servlet.http.HttpServletResponse#sendRedirect(String).
    Author:
    Paul Ferraro
    • Constructor Detail

      • OrphanSession

        public OrphanSession​(io.undertow.server.session.SessionManager manager,
                             String id)
    • Method Detail

      • getId

        public String getId()
        Specified by:
        getId in interface io.undertow.server.session.Session
      • requestDone

        public void requestDone​(io.undertow.server.HttpServerExchange serverExchange)
        Specified by:
        requestDone in interface io.undertow.server.session.Session
      • getCreationTime

        public long getCreationTime()
        Specified by:
        getCreationTime in interface io.undertow.server.session.Session
      • getLastAccessedTime

        public long getLastAccessedTime()
        Specified by:
        getLastAccessedTime in interface io.undertow.server.session.Session
      • setMaxInactiveInterval

        public void setMaxInactiveInterval​(int interval)
        Specified by:
        setMaxInactiveInterval in interface io.undertow.server.session.Session
      • getMaxInactiveInterval

        public int getMaxInactiveInterval()
        Specified by:
        getMaxInactiveInterval in interface io.undertow.server.session.Session
      • getAttribute

        public Object getAttribute​(String name)
        Specified by:
        getAttribute in interface io.undertow.server.session.Session
      • getAttributeNames

        public Set<String> getAttributeNames()
        Specified by:
        getAttributeNames in interface io.undertow.server.session.Session
      • setAttribute

        public Object setAttribute​(String name,
                                   Object value)
        Specified by:
        setAttribute in interface io.undertow.server.session.Session
      • removeAttribute

        public Object removeAttribute​(String name)
        Specified by:
        removeAttribute in interface io.undertow.server.session.Session
      • invalidate

        public void invalidate​(io.undertow.server.HttpServerExchange exchange)
        Specified by:
        invalidate in interface io.undertow.server.session.Session
      • getSessionManager

        public io.undertow.server.session.SessionManager getSessionManager()
        Specified by:
        getSessionManager in interface io.undertow.server.session.Session
      • changeSessionId

        public String changeSessionId​(io.undertow.server.HttpServerExchange exchange,
                                      io.undertow.server.session.SessionConfig config)
        Specified by:
        changeSessionId in interface io.undertow.server.session.Session