Package org.zkoss.zk.ui.sys
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 TypeMethodDescriptionvoidDestroys the session cacheRetrieves a ZK session from the cache, or null if the ZK session is not stored.voidInitializes the session cache.voidPuts a ZK session to the cache.voidRemoves the ZK session from the cache.
-
Method Details
-
init
Initializes the session cache. It is called right after being instantiated. -
destroy
Destroys the session cache- Since:
- 3.6.0
-
put
Puts a ZK session to the cache. You can retrieve the native session bySession.getNativeSession().- Parameters:
sess- the ZK session.
-
get
Retrieves a ZK session from the cache, or null if the ZK session is not stored. -
remove
Removes the ZK session from the cache.
-