Class MCRSessionResolver

java.lang.Object
org.mycore.common.MCRSessionResolver
All Implemented Interfaces:
jakarta.servlet.http.HttpSessionBindingListener, Serializable, EventListener

public final class MCRSessionResolver extends Object implements Serializable, jakarta.servlet.http.HttpSessionBindingListener
This Class will be stored in the a HttpSession and can be used to resolve the MCRSession. We can not store MCRSession directly in the HttpSession because values need to be Serializable.
See Also:
  • Constructor Details

    • MCRSessionResolver

      public MCRSessionResolver(MCRSession session)
  • Method Details

    • getSessionID

      public String getSessionID()
    • resolveSession

      public Optional<MCRSession> resolveSession()
      Tries to resolve the MCRSession throught the MCRSessionMgr
      Returns:
      if is already closed it will return a Optional.empty()
    • valueBound

      public void valueBound(jakarta.servlet.http.HttpSessionBindingEvent hsbe)
      Specified by:
      valueBound in interface jakarta.servlet.http.HttpSessionBindingListener
    • valueUnbound

      public void valueUnbound(jakarta.servlet.http.HttpSessionBindingEvent hsbe)
      Specified by:
      valueUnbound in interface jakarta.servlet.http.HttpSessionBindingListener
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object