org.zkoss.zk.ui.impl
Class GlobalDesktopCacheProvider

java.lang.Object
  extended by org.zkoss.zk.ui.impl.GlobalDesktopCacheProvider
All Implemented Interfaces:
java.io.Serializable, DesktopCacheProvider

public class GlobalDesktopCacheProvider
extends java.lang.Object
implements DesktopCacheProvider, java.io.Serializable

A implementation of DesktopCacheProvider that stores all desktops from the same Web application into one desktop cache.

In other words, it ignores the session, and it depends only on WebApp.

Author:
tomyeh
See Also:
SessionDesktopCacheProvider, Serialized Form

Constructor Summary
GlobalDesktopCacheProvider()
           
 
Method Summary
 DesktopCache getDesktopCache(Session sess)
          Returns a desktop cache of the specified session.
 void sessionDestroyed(Session sess)
          Called when a session is destroyed.
 void sessionDidActivate(Session sess)
          Invokes getDesktopCache(org.zkoss.zk.ui.Session)'s DesktopCache.sessionDidActivate(org.zkoss.zk.ui.Session).
 void sessionWillPassivate(Session sess)
          Invokes getDesktopCache(org.zkoss.zk.ui.Session)'s DesktopCache.sessionWillPassivate(org.zkoss.zk.ui.Session).
 void start(WebApp wapp)
          Starts the provider.
 void stop(WebApp wapp)
          Stops the provider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlobalDesktopCacheProvider

public GlobalDesktopCacheProvider()
Method Detail

getDesktopCache

public DesktopCache getDesktopCache(Session sess)
Description copied from interface: DesktopCacheProvider
Returns a desktop cache of the specified session.

The implementation might ignore session and use a global cache instead. Moreover, it might implement a cache supporting clustering.

Specified by:
getDesktopCache in interface DesktopCacheProvider

sessionDestroyed

public void sessionDestroyed(Session sess)
Description copied from interface: DesktopCacheProvider
Called when a session is destroyed. If the provider is session-based, it has to remove relevant desktops. If not, it might ignore this method.

Application shall never access this method.

Specified by:
sessionDestroyed in interface DesktopCacheProvider

sessionWillPassivate

public void sessionWillPassivate(Session sess)
Invokes getDesktopCache(org.zkoss.zk.ui.Session)'s DesktopCache.sessionWillPassivate(org.zkoss.zk.ui.Session).

Specified by:
sessionWillPassivate in interface DesktopCacheProvider

sessionDidActivate

public void sessionDidActivate(Session sess)
Invokes getDesktopCache(org.zkoss.zk.ui.Session)'s DesktopCache.sessionDidActivate(org.zkoss.zk.ui.Session).

Specified by:
sessionDidActivate in interface DesktopCacheProvider

start

public void start(WebApp wapp)
Description copied from interface: DesktopCacheProvider
Starts the provider.

Specified by:
start in interface DesktopCacheProvider

stop

public void stop(WebApp wapp)
Description copied from interface: DesktopCacheProvider
Stops the provider.

Specified by:
stop in interface DesktopCacheProvider


Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo