Package org.zkoss.zk.ui.sys
Interface DesktopCache
- All Known Implementing Classes:
SimpleDesktopCache
public interface DesktopCache
The cache used to store desktops.
- Author:
- tomyeh
-
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) Notification that the session has just been activated (a.k.a., deserialized).voidsessionWillPassivate(Session sess) Notification that the session is about to be passivated (a.k.a., serialized).voidstop()Called when to stop and cleanup this cache.
-
Method Details
-
getDesktop
Returns the desktop for the specified desktop ID.- Throws:
ComponentNotFoundException- is thrown if the desktop is not found
-
getDesktopIfAny
Returns the desktop for the specified desktop ID, or null if not found. -
addDesktop
Adds a desktop to this session. It must be called when a desktop is created.Application shall never access this method.
-
removeDesktop
Removes a desktop from this session. It must be called when a desktop is remove.Application shall never access this method.
-
sessionWillPassivate
Notification that the session is about to be passivated (a.k.a., serialized). -
sessionDidActivate
Notification that the session has just been activated (a.k.a., deserialized). -
stop
void stop()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. -
getAllDesktops
Returns all the desktops in this cache. It is used only internally.- Since:
- 10.1.0
-