Class JEESessionStore

  • All Implemented Interfaces:
    org.pac4j.core.context.session.SessionStore

    public class JEESessionStore
    extends java.lang.Object
    implements org.pac4j.core.context.session.SessionStore
    Store data in the JEE web session.
    Since:
    1.8.1
    Author:
    Jerome Leleu
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected JEESessionStore()  
      protected JEESessionStore​(javax.servlet.http.HttpSession httpSession)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Optional<org.pac4j.core.context.session.SessionStore> buildFromTrackableSession​(org.pac4j.core.context.WebContext context, java.lang.Object trackableSession)  
      boolean destroySession​(org.pac4j.core.context.WebContext context)  
      java.util.Optional<java.lang.Object> get​(org.pac4j.core.context.WebContext context, java.lang.String key)  
      protected java.util.Optional<javax.servlet.http.HttpSession> getNativeSession​(org.pac4j.core.context.WebContext context, boolean createSession)  
      java.util.Optional<java.lang.String> getSessionId​(org.pac4j.core.context.WebContext context, boolean createSession)  
      java.util.Optional<java.lang.Object> getTrackableSession​(org.pac4j.core.context.WebContext context)  
      boolean renewSession​(org.pac4j.core.context.WebContext context)  
      void set​(org.pac4j.core.context.WebContext context, java.lang.String key, java.lang.Object value)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • httpSession

        protected javax.servlet.http.HttpSession httpSession
    • Constructor Detail

      • JEESessionStore

        protected JEESessionStore()
      • JEESessionStore

        protected JEESessionStore​(javax.servlet.http.HttpSession httpSession)
    • Method Detail

      • getNativeSession

        protected java.util.Optional<javax.servlet.http.HttpSession> getNativeSession​(org.pac4j.core.context.WebContext context,
                                                                                      boolean createSession)
      • getSessionId

        public java.util.Optional<java.lang.String> getSessionId​(org.pac4j.core.context.WebContext context,
                                                                 boolean createSession)
        Specified by:
        getSessionId in interface org.pac4j.core.context.session.SessionStore
      • get

        public java.util.Optional<java.lang.Object> get​(org.pac4j.core.context.WebContext context,
                                                        java.lang.String key)
        Specified by:
        get in interface org.pac4j.core.context.session.SessionStore
      • set

        public void set​(org.pac4j.core.context.WebContext context,
                        java.lang.String key,
                        java.lang.Object value)
        Specified by:
        set in interface org.pac4j.core.context.session.SessionStore
      • destroySession

        public boolean destroySession​(org.pac4j.core.context.WebContext context)
        Specified by:
        destroySession in interface org.pac4j.core.context.session.SessionStore
      • getTrackableSession

        public java.util.Optional<java.lang.Object> getTrackableSession​(org.pac4j.core.context.WebContext context)
        Specified by:
        getTrackableSession in interface org.pac4j.core.context.session.SessionStore
      • buildFromTrackableSession

        public java.util.Optional<org.pac4j.core.context.session.SessionStore> buildFromTrackableSession​(org.pac4j.core.context.WebContext context,
                                                                                                         java.lang.Object trackableSession)
        Specified by:
        buildFromTrackableSession in interface org.pac4j.core.context.session.SessionStore
      • renewSession

        public boolean renewSession​(org.pac4j.core.context.WebContext context)
        Specified by:
        renewSession in interface org.pac4j.core.context.session.SessionStore