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:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Destroys the session cache
    get(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
    Removes the ZK session from the cache.
  • Method Details

    • 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(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.