org.zkoss.zk.device
Class AjaxDevice

java.lang.Object
  extended by org.zkoss.zk.device.GenericDevice
      extended by org.zkoss.zk.device.AjaxDevice
All Implemented Interfaces:
Device

public class AjaxDevice
extends GenericDevice

Represents a Web browser with the Ajax support.

Since:
2.4.0
Author:
tomyeh

Field Summary
 
Fields inherited from interface org.zkoss.zk.device.Device
RESEND
 
Constructor Summary
AjaxDevice()
           
 
Method Summary
 java.lang.String getContentType()
          Returns text/html
 java.lang.String getDocType()
          Returns <!
 boolean isCacheable()
          Return false to indicate it is not cacheable.
 java.lang.Boolean isCompatible(java.lang.String userAgent)
          Returns null to indicate unknown.
 boolean isSupported(int func)
          It supports Device.RESEND.
 
Methods inherited from class org.zkoss.zk.device.GenericDevice
addEmbedded, getEmbedded, getServerPushClass, getTimeoutURI, getType, getUnavailableMessage, init, isClient, sessionDidActivate, sessionWillPassivate, setServerPushClass, setTimeoutURI, setUnavailableMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AjaxDevice

public AjaxDevice()
Method Detail

isSupported

public boolean isSupported(int func)
It supports Device.RESEND.

Specified by:
isSupported in interface Device
Overrides:
isSupported in class GenericDevice
Parameters:
func - the function. It can be one of Device.RESEND.

isCacheable

public boolean isCacheable()
Return false to indicate it is not cacheable.

Specified by:
isCacheable in interface Device
Overrides:
isCacheable in class GenericDevice

isCompatible

public java.lang.Boolean isCompatible(java.lang.String userAgent)
Description copied from class: GenericDevice
Returns null to indicate unknown. Deriving should override it to provide more precise information.

Specified by:
isCompatible in interface Device
Overrides:
isCompatible in class GenericDevice
Parameters:
userAgent - represents a client. For HTTP clients, It is the user-agent header.
Returns:
Boolean.TRUE if this device supports the specified client, Boolean.FALSE if cannot, or null if unknown.
See Also:
Execution.getUserAgent(), Devices.getDeviceByClient(java.lang.String)

getContentType

public java.lang.String getContentType()
Returns text/html


getDocType

public java.lang.String getDocType()
Returns <!DOCTYPE html ...XHTML 1.0 Transitional...>.

Specified by:
getDocType in interface Device
Overrides:
getDocType in class GenericDevice


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