|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Device
Represents a client device.
For example, the HTML browsers with Ajax are called AjaxDevice,
and the MIL device called org.zkoss.mil.device.MilDevice.
Note: the device must be serializable.
| Method Summary | |
|---|---|
java.lang.String |
getType()
Returns the device type. |
java.lang.String |
getUnavailableMessage()
Returns the unavailable message that is shown to the client if the client doesn't support this device. |
void |
init(java.lang.String type,
Desktop desktop,
java.lang.String unavailmsg)
Initializes the device. |
void |
sessionDidActivate(Desktop desktop)
Notification that the desktop, which owns this device, has just been activated (aka., deserialized) by the Web container. |
void |
sessionWillPassivate(Desktop desktop)
Notification that the desktop, which owns this device, is about to be passivated (aka., serialized) by the Web container. |
void |
setUnavailableMessage(java.lang.String unavailmsg)
Sets the unavailable message that is shown to the client if the client doesn't support this device. |
| Method Detail |
|---|
java.lang.String getType()
java.lang.String getUnavailableMessage()
void setUnavailableMessage(java.lang.String unavailmsg)
Note: this method must be called before the desktop is rendered (and sent to the client). Otherwise, it is meaningless.
unavailmsg - the unavailable message.
void init(java.lang.String type,
Desktop desktop,
java.lang.String unavailmsg)
type - the device typedesktop - the desktop to associate this device with (never null).unavailmsg - the message to shown when the device is not, or null
no message will be shownvoid sessionWillPassivate(Desktop desktop)
void sessionDidActivate(Desktop desktop)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||