Package org.zkoss.zk.ui.sys
Interface SessionCache
-
- All Known Implementing Classes:
SimpleSessionCache
public interface SessionCacheThe 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 voiddestroy(WebApp wapp)Destroys the session cacheSessionget(java.lang.Object navsess)Retrieves a ZK session from the cache, or null if the ZK session is not stored.voidinit(WebApp wapp)Initializes the session cache.voidput(Session sess)Puts a ZK session to the cache.voidremove(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 bySession.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.
-
-