Package org.zkoss.zk.ui.http
Class SimpleSessionCache
- java.lang.Object
-
- org.zkoss.zk.ui.http.SimpleSessionCache
-
- All Implemented Interfaces:
SessionCache
public class SimpleSessionCache extends java.lang.Object implements SessionCache
A simple implementation ofSessionCache
.- Since:
- 3.0.5
- Author:
- tomyeh
-
-
Constructor Summary
Constructors Constructor Description SimpleSessionCache()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy(WebApp wapp)
Destroys the session cacheSession
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
public void init(WebApp wapp)
Description copied from interface:SessionCache
Initializes the session cache. It is called right after being instantiated.- Specified by:
init
in interfaceSessionCache
-
destroy
public void destroy(WebApp wapp)
Description copied from interface:SessionCache
Destroys the session cache- Specified by:
destroy
in interfaceSessionCache
-
put
public void put(Session sess)
Description copied from interface:SessionCache
Puts a ZK session to the cache. You can retrieve the native session bySession.getNativeSession()
.- Specified by:
put
in interfaceSessionCache
- Parameters:
sess
- the ZK session.
-
get
public Session get(java.lang.Object navsess)
Description copied from interface:SessionCache
Retrieves a ZK session from the cache, or null if the ZK session is not stored.- Specified by:
get
in interfaceSessionCache
-
remove
public void remove(Session sess)
Description copied from interface:SessionCache
Removes the ZK session from the cache.- Specified by:
remove
in interfaceSessionCache
-
-