Package org.zkoss.zk.ui.impl
Class SimpleDesktopCache
java.lang.Object
org.zkoss.zk.ui.impl.SimpleDesktopCache
- All Implemented Interfaces:
Serializable,DesktopCache
A simple implementation of
DesktopCache. It manages
all desktop in a CacheMap instance.- Author:
- tomyeh
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDesktop(Desktop desktop) Adds a desktop to this session.Returns all the desktops in this cache.getDesktop(String desktopId) Returns the desktop for the specified desktop ID.getDesktopIfAny(String desktopId) Returns the desktop for the specified desktop ID, or null if not found.voidremoveDesktop(Desktop desktop) Removes a desktop from this session.voidsessionDidActivate(Session sess) InvokesDesktopCtrl.sessionDidActivate(org.zkoss.zk.ui.Session)for each desktops it cached.voidsessionWillPassivate(Session sess) InvokesDesktopCtrl.sessionWillPassivate(org.zkoss.zk.ui.Session)for each desktops it cached.voidstop()Called when to stop and cleanup this cache.
-
Constructor Details
-
SimpleDesktopCache
-
-
Method Details
-
getDesktopIfAny
Description copied from interface:DesktopCacheReturns the desktop for the specified desktop ID, or null if not found.- Specified by:
getDesktopIfAnyin interfaceDesktopCache
-
getDesktop
Description copied from interface:DesktopCacheReturns the desktop for the specified desktop ID.- Specified by:
getDesktopin interfaceDesktopCache
-
addDesktop
Description copied from interface:DesktopCacheAdds a desktop to this session. It must be called when a desktop is created.Application shall never access this method.
- Specified by:
addDesktopin interfaceDesktopCache
-
removeDesktop
Description copied from interface:DesktopCacheRemoves a desktop from this session. It must be called when a desktop is remove.Application shall never access this method.
- Specified by:
removeDesktopin interfaceDesktopCache
-
sessionWillPassivate
InvokesDesktopCtrl.sessionWillPassivate(org.zkoss.zk.ui.Session)for each desktops it cached.- Specified by:
sessionWillPassivatein interfaceDesktopCache
-
sessionDidActivate
InvokesDesktopCtrl.sessionDidActivate(org.zkoss.zk.ui.Session)for each desktops it cached.- Specified by:
sessionDidActivatein interfaceDesktopCache
-
stop
public void stop()Description copied from interface:DesktopCacheCalled 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:
stopin interfaceDesktopCache
-
getAllDesktops
Description copied from interface:DesktopCacheReturns all the desktops in this cache. It is used only internally.- Specified by:
getAllDesktopsin interfaceDesktopCache
-