Package org.zkoss.zk.ui.impl
Class SimpleDesktopCache
- java.lang.Object
-
- org.zkoss.zk.ui.impl.SimpleDesktopCache
-
- All Implemented Interfaces:
java.io.Serializable
,DesktopCache
public class SimpleDesktopCache extends java.lang.Object implements DesktopCache, java.io.Serializable
A simple implementation ofDesktopCache
. It manages all desktop in aCacheMap
instance.- Author:
- tomyeh
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SimpleDesktopCache(Configuration config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDesktop(Desktop desktop)
Adds a desktop to this session.Desktop
getDesktop(java.lang.String desktopId)
Returns the desktop for the specified desktop ID.Desktop
getDesktopIfAny(java.lang.String desktopId)
Returns the desktop for the specified desktop ID, or null if not found.void
removeDesktop(Desktop desktop)
Removes a desktop from this session.void
sessionDidActivate(Session sess)
InvokesDesktopCtrl.sessionDidActivate(org.zkoss.zk.ui.Session)
for each desktops it cached.void
sessionWillPassivate(Session sess)
InvokesDesktopCtrl.sessionWillPassivate(org.zkoss.zk.ui.Session)
for each desktops it cached.void
stop()
Called when to stop and cleanup this cache.
-
-
-
Constructor Detail
-
SimpleDesktopCache
public SimpleDesktopCache(Configuration config)
-
-
Method Detail
-
getDesktopIfAny
public Desktop getDesktopIfAny(java.lang.String desktopId)
Description copied from interface:DesktopCache
Returns the desktop for the specified desktop ID, or null if not found.- Specified by:
getDesktopIfAny
in interfaceDesktopCache
-
getDesktop
public Desktop getDesktop(java.lang.String desktopId)
Description copied from interface:DesktopCache
Returns the desktop for the specified desktop ID.- Specified by:
getDesktop
in interfaceDesktopCache
-
addDesktop
public void addDesktop(Desktop desktop)
Description copied from interface:DesktopCache
Adds a desktop to this session. It must be called when a desktop is created.Application shall never access this method.
- Specified by:
addDesktop
in interfaceDesktopCache
-
removeDesktop
public void removeDesktop(Desktop desktop)
Description copied from interface:DesktopCache
Removes a desktop from this session. It must be called when a desktop is remove.Application shall never access this method.
- Specified by:
removeDesktop
in interfaceDesktopCache
-
sessionWillPassivate
public void sessionWillPassivate(Session sess)
InvokesDesktopCtrl.sessionWillPassivate(org.zkoss.zk.ui.Session)
for each desktops it cached.- Specified by:
sessionWillPassivate
in interfaceDesktopCache
-
sessionDidActivate
public void sessionDidActivate(Session sess)
InvokesDesktopCtrl.sessionDidActivate(org.zkoss.zk.ui.Session)
for each desktops it cached.- Specified by:
sessionDidActivate
in interfaceDesktopCache
-
stop
public void stop()
Description copied from interface:DesktopCache
Called when to stop and cleanup this cache. Once stopped, the caller shall not access it any more. It cannot be called other than the implementation ofDesktopCacheProvider
.- Specified by:
stop
in interfaceDesktopCache
-
-