?? device.java
字號:
/* Device.java{{IS_NOTE Purpose: Description: History: Mon May 14 19:13:14 2007, Created by tomyeh}}IS_NOTECopyright (C) 2007 Potix Corporation. All Rights Reserved.{{IS_RIGHT This program is distributed under GPL Version 2.0 in the hope that it will be useful, but WITHOUT ANY WARRANTY.}}IS_RIGHT*/package org.zkoss.zk.device;import org.zkoss.zk.ui.Desktop;import org.zkoss.zk.ui.sys.ServerPush;/** * Represents a client device. * For example, the HTML browsers with Ajax are called {@link AjaxDevice}, * the XML output called org.zkoss.zml.device.XmlDevice, * and the MIL device called org.zkoss.mil.device.MilDevice. * * <p>Note: the same device is shared by all desktops of the same device * type. * * @author tomyeh * @since 2.4.0 */public interface Device { /** Returns the device type. */ public String getType(); /** Returns whether the output can be cached by the client. */ public boolean isCacheable(); /** Returns the unavailable message that is shown to the client * if the client doesn't support this device. * * @return the unavailable message, or null if no such message * @since 2.4.0 */ public String getUnavailableMessage(); /** Sets the unavailable message that is shown to the client * if the client doesn't support this device. * * @param unavailmsg the unavailable message. * @return the previous unavailable message, or null if not such message * @since 2.4.0 */ public String setUnavailableMessage(String unavailmsg); /** Returns the timeout URI for this device. * It is used to show the error message if the desktop being requested * is not found. It is usually caused by session timeout. * * <p>Default: null (to shown an error message). * * @since 3.0.0 */ public String getTimeoutURI(); /** Sets the timeout URI. * It is used to show the error message if the desktop being requested * is not found. It is usually caused by session timeout. * * @param timeoutURI the timeout URI. If empty, it means to reload * the same page. If null, an error message is shown instead of * redirecting to another page. * @return the previous timeout URI, or null if not available. * @since 3.0.0 */ public String setTimeoutURI(String timeoutURI); /** Returns the class that implements the server-push feature * ({@link ServerPush}) for this device, or null if the default is used. * @since 3.0.0 */ public Class getServerPushClass(); /** Sets the class that implements the server-push feature * ({@link ServerPush}) for this device, or null to use the default. * * <p>Default: null. * * <p>If the professional edition (with zkex.jar) is loaded, * the client-polling-based server push (org.zkoss.zkex.ui.impl.PollingServerPush) * is the default. * If the enterprise edition (with zkmax.jar) is loaded, * the COMET-based server push (org.zkoss.zkmax.ui.impl.CometServerPush) * is the default. * @return the previous class, or null if not available. * @since 3.0.0 */ public Class setServerPushClass(Class cls); /** Returns the default content type (never null). * * @since 3.0.0 */ public String getContentType(); /** Returns the default doc type, or null if no doc type at all. * * @since 3.0.0 */ public String getDocType(); /** Initializes the device. * A device is created for each desktop, and this method is called * when it is associated to the desktop. * * @param deviceType the device type (never null) * @param config the configuration to initialize the device (never null) * @since 3.0.0 */ public void init(String deviceType, DeviceConfig config); /** Notification that the desktop, which owns this device, * is about to be passivated (aka., serialized) by the Web container. * @since 2.4.0 */ public void sessionWillPassivate(Desktop desktop); /** Notification that the desktop, which owns this device, * has just been activated (aka., deserialized) by the Web container. * @since 2.4.0 */ public void sessionDidActivate(Desktop desktop);}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -