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 aCacheMapinstance.- 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 voidaddDesktop(Desktop desktop)Adds a desktop to this session.java.util.List<Desktop>getAllDesktops()Returns all the desktops in this cache.DesktopgetDesktop(java.lang.String desktopId)Returns the desktop for the specified desktop ID.DesktopgetDesktopIfAny(java.lang.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 Detail
-
SimpleDesktopCache
public SimpleDesktopCache(Configuration config)
-
-
Method Detail
-
getDesktopIfAny
public Desktop getDesktopIfAny(java.lang.String desktopId)
Description copied from interface:DesktopCacheReturns the desktop for the specified desktop ID, or null if not found.- Specified by:
getDesktopIfAnyin interfaceDesktopCache
-
getDesktop
public Desktop getDesktop(java.lang.String desktopId)
Description copied from interface:DesktopCacheReturns the desktop for the specified desktop ID.- Specified by:
getDesktopin interfaceDesktopCache
-
addDesktop
public void addDesktop(Desktop desktop)
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
public void removeDesktop(Desktop desktop)
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
public void sessionWillPassivate(Session sess)
InvokesDesktopCtrl.sessionWillPassivate(org.zkoss.zk.ui.Session)for each desktops it cached.- Specified by:
sessionWillPassivatein interfaceDesktopCache
-
sessionDidActivate
public void sessionDidActivate(Session sess)
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
public java.util.List<Desktop> getAllDesktops()
Description copied from interface:DesktopCacheReturns all the desktops in this cache. It is used only internally.- Specified by:
getAllDesktopsin interfaceDesktopCache
-
-