Package org.zkoss.zk.ui.sys
Interface WebAppCtrl
- All Known Implementing Classes:
AbstractWebApp,SimpleWebApp
public interface WebAppCtrl
Additional interface of
WebApp for implementation.
Note: applications shall never access this interface.
- Author:
- tomyeh
-
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Destroys this Web application.Returns the AU decoder for this Web application, or null if not assigned.getDesktopCache(Session sess) Returns the desktop cache.Returns the desktop cache provider.Returns the failover manager, or null if not available.Returns the ID generator, or null if not available.Returns the session cache (never null).Returns the UI engine for this Web application (never null).Returns the UI factory for this Web application (never null).voidinit(Object context, Configuration config) Initializes this Web application.voidsessionDestroyed(Session sess) Called when the native session of the specified session has been destroyedvoidsessionDidActivate(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).voidsetAuDecoder(AuDecoder audec) Sets the AU decoder for this Web application.voidsetDesktopCacheProvider(DesktopCacheProvider provider) Sets the desktop provider for this Web application.voidsetFailoverManager(FailoverManager manager) Sets the failover manager for this Web application.voidsetIdGenerator(IdGenerator generator) Sets the ID generator for this Web application.voidsetSessionCache(SessionCache cache) Sets the session cache for this Web application.voidsetUiEngine(UiEngine engine) Sets the UI engine for this Web application.voidsetUiFactory(UiFactory factory) Sets the UI factory for this Web application.
-
Method Details
-
init
Initializes this Web application.- Parameters:
context- the servlet context, if servlets are used. Currently, ZK supports only servlets. In the future there might be more to support.config- the configuration (never null)
-
destroy
void destroy()Destroys this Web application.Note; once destroyed, this instance cannot be used anymore.
-
getUiEngine
UiEngine getUiEngine()Returns the UI engine for this Web application (never null). -
setUiEngine
Sets the UI engine for this Web application. The UI engine is stateful so it is not safe to change it if there are active sessions.- Parameters:
engine- the UI engine- Throws:
IllegalArgumentException- if engine is null.- Since:
- 3.6.0
-
getDesktopCache
Returns the desktop cache. A shortcut ofgetDesktopCacheProvider()'sDesktopCacheProvider.getDesktopCache(org.zkoss.zk.ui.Session). -
getDesktopCacheProvider
DesktopCacheProvider getDesktopCacheProvider()Returns the desktop cache provider. -
setDesktopCacheProvider
Sets the desktop provider for this Web application.- Parameters:
provider- the desktop cache provider- Throws:
IllegalArgumentException- if provider is null.- Since:
- 3.6.0
-
getUiFactory
UiFactory getUiFactory()Returns the UI factory for this Web application (never null). -
setUiFactory
Sets the UI factory for this Web application.- Parameters:
factory- the UI factory- Throws:
IllegalArgumentException- if factory is null.- Since:
- 3.6.0
-
getFailoverManager
FailoverManager getFailoverManager()Returns the failover manager, or null if not available. -
setFailoverManager
Sets the failover manager for this Web application.- Parameters:
manager- the failover manager. If null, it means no failover manager at all.- Since:
- 3.6.0
-
getIdGenerator
IdGenerator getIdGenerator()Returns the ID generator, or null if not available.- Since:
- 2.4.1
-
setIdGenerator
Sets the ID generator for this Web application.- Parameters:
generator- the ID generator. If null, it means no (custom) ID generator at all.- Since:
- 3.6.0
-
getSessionCache
SessionCache getSessionCache()Returns the session cache (never null). The session cache is used to store ZK sessions.- Since:
- 3.0.5
-
setSessionCache
Sets the session cache for this Web application.- Parameters:
cache- the session cache- Throws:
IllegalArgumentException- if cache is null.- Since:
- 3.6.0
-
getAuDecoder
AuDecoder getAuDecoder()Returns the AU decoder for this Web application, or null if not assigned.- Since:
- 5.0.4
-
setAuDecoder
Sets the AU decoder for this Web application.Default: null (using the system default).
- Since:
- 5.0.4
-
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). -
sessionDestroyed
Called when the native session of the specified session has been destroyed- Since:
- 3.5.1
-