01: /* WebAppCtrl.java
02:
03: {{IS_NOTE
04: Purpose:
05:
06: Description:
07:
08: History:
09: Tue Apr 18 11:07:30 2006, Created by tomyeh
10: }}IS_NOTE
11:
12: Copyright (C) 2006 Potix Corporation. All Rights Reserved.
13:
14: {{IS_RIGHT
15: This program is distributed under GPL Version 2.0 in the hope that
16: it will be useful, but WITHOUT ANY WARRANTY.
17: }}IS_RIGHT
18: */
19: package org.zkoss.zk.ui.sys;
20:
21: import org.zkoss.zk.ui.Session;
22: import org.zkoss.zk.ui.util.Configuration;
23:
24: /**
25: * Additional interface of {@link org.zkoss.zk.ui.WebApp} for implementation.
26: * <p>Note: applications shall never access this interface.
27: *
28: * @author tomyeh
29: */
30: public interface WebAppCtrl {
31: /** Initializes this Web application.
32: *
33: * @param context the servlet context, if servlets are used.
34: * Currently, ZK supports only servlets. In the future there might be
35: * more to support.
36: * @param config the configuration (never null)
37: */
38: public void init(Object context, Configuration config);
39:
40: /** Destroys this Web applicaiton.
41: * <p>Note; once destroyed, this instance cannot be used anymore.
42: */
43: public void destroy();
44:
45: /** Returns the UI engine for this Web application (never null).
46: */
47: public UiEngine getUiEngine();
48:
49: /** Returns the desktop cache.
50: * A shortcut of {@link #getDesktopCacheProvider}'s
51: * {@link DesktopCacheProvider#getDesktopCache}.
52: */
53: public DesktopCache getDesktopCache(Session sess);
54:
55: /** Returns the desktop cache provider.
56: */
57: public DesktopCacheProvider getDesktopCacheProvider();
58:
59: /** Returns the UI factory for this Web application (never null).
60: */
61: public UiFactory getUiFactory();
62:
63: /** Returns the failover manager, or null if not available.
64: */
65: public FailoverManager getFailoverManager();
66:
67: /** Returns the ID generator, or null if not available.
68: *
69: * @since 2.4.1
70: */
71: public IdGenerator getIdGenerator();
72:
73: /** Notification that the session is about to be passivated
74: * (aka., serialized).
75: */
76: public void sessionWillPassivate(Session sess);
77:
78: /** Notification that the session has just been activated
79: * (aka., deserialized).
80: */
81: public void sessionDidActivate(Session sess);
82: }
|