public class SimpleDesktopCache extends java.lang.Object implements DesktopCache, java.io.Serializable
DesktopCache
. It manages
all desktop in a CacheMap
instance.Constructor and Description |
---|
SimpleDesktopCache(Configuration config) |
Modifier and Type | Method and 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.
|
int |
getNextKey()
Returns the next available key which is unique in the whole cache.
|
void |
removeDesktop(Desktop desktop)
Removes a desktop from this session.
|
void |
sessionDidActivate(Session sess)
Invokes
DesktopCtrl.sessionDidActivate(org.zkoss.zk.ui.Session) for each
desktops it cached. |
void |
sessionWillPassivate(Session sess)
Invokes
DesktopCtrl.sessionWillPassivate(org.zkoss.zk.ui.Session) for each
desktops it cached. |
void |
stop()
Called when to stop and cleanup this cache.
|
public SimpleDesktopCache(Configuration config)
public int getNextKey()
DesktopCache
Desktop
uses this method to generate ID automatically.
getNextKey
in interface DesktopCache
public Desktop getDesktopIfAny(java.lang.String desktopId)
DesktopCache
getDesktopIfAny
in interface DesktopCache
public Desktop getDesktop(java.lang.String desktopId)
DesktopCache
getDesktop
in interface DesktopCache
public void addDesktop(Desktop desktop)
DesktopCache
Application shall never access this method.
addDesktop
in interface DesktopCache
public void removeDesktop(Desktop desktop)
DesktopCache
Application shall never access this method.
removeDesktop
in interface DesktopCache
public void sessionWillPassivate(Session sess)
DesktopCtrl.sessionWillPassivate(org.zkoss.zk.ui.Session)
for each
desktops it cached.sessionWillPassivate
in interface DesktopCache
public void sessionDidActivate(Session sess)
DesktopCtrl.sessionDidActivate(org.zkoss.zk.ui.Session)
for each
desktops it cached.sessionDidActivate
in interface DesktopCache
public void stop()
DesktopCache
DesktopCacheProvider
.stop
in interface DesktopCache
Copyright © 2005-2021 Potix Corporation. All Rights Reserved.