Interface SessionCache

  • All Known Implementing Classes:
    SimpleSessionCache

    public interface SessionCache
    The cache for storing ZK sessions. The default implementation (@{link org.zkoss.zk.ui.http.SimpleSessionCache}) uses an attribute of the native session to store the ZK session. Provide your implementation if you want to use other ways to store the ZK sessions (such as using a map).
    Since:
    3.0.5
    Author:
    tomyeh
    See Also:
    Configuration.setSessionCacheClass(java.lang.Class<?>)
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void destroy​(WebApp wapp)
      Destroys the session cache
      Session get​(java.lang.Object navsess)
      Retrieves a ZK session from the cache, or null if the ZK session is not stored.
      void init​(WebApp wapp)
      Initializes the session cache.
      void put​(Session sess)
      Puts a ZK session to the cache.
      void remove​(Session sess)
      Removes the ZK session from the cache.
    • Method Detail

      • init

        void init​(WebApp wapp)
        Initializes the session cache. It is called right after being instantiated.
      • destroy

        void destroy​(WebApp wapp)
        Destroys the session cache
        Since:
        3.6.0
      • put

        void put​(Session sess)
        Puts a ZK session to the cache. You can retrieve the native session by Session.getNativeSession().
        Parameters:
        sess - the ZK session.
      • get

        Session get​(java.lang.Object navsess)
        Retrieves a ZK session from the cache, or null if the ZK session is not stored.
      • remove

        void remove​(Session sess)
        Removes the ZK session from the cache.