NextApp Echo
App Container 1.0.5

nextapp.echoservlet
Class ClientProperties

java.lang.Object
  extended bynextapp.echoservlet.ClientProperties
All Implemented Interfaces:
java.io.Serializable

public final class ClientProperties
extends java.lang.Object
implements java.io.Serializable

A repository of information gathered from a user's client browser. This object contains such information as the width and height of the user's screen and his/her browser make and version.

See Also:
Serialized Form

Field Summary
static java.lang.String ACCEPT
          The property name referencing the client's accepted response content types.
static java.lang.String ACCEPT_CHARSET
          The property name referencing the client's accepted character sets.
static java.lang.String ACCEPT_ENCODING
          The property name referencing the client's accepted character encodings.
static java.lang.String ACCEPT_LANGUAGE
          The property name referencing the client's accepted languages.
static java.lang.String APP_NAME
          The property name referencing the browser's application name.
static java.lang.String APP_VERSION
          The property name referencing the browser's version string.
static java.lang.String BACK_BUTTON_DISABLE_SUPPORT
          The property name referencing whether the browser will allow the back button to be effectively disabled by placing a history.go(1) method call in the controller frame.
static java.lang.String CHROME_HEIGHT
          The property name referencing the browser's "chrome height".
static java.lang.String CHROME_WIDTH
          The property name referencing the browser's "chrome width".
static java.lang.String COLOR_DEPTH
          The property name referencing the client machine's video color depth.
static java.lang.String CSS_MODIFICATION_SUPPORT
          The property name referencing a boolean indicator as to whether the browser supports dynamic modification of CSS styles.
static java.lang.String CSS_TABLE_CELL_ALIGNMENT_SUPPORT
          The property name referencing a boolean indicator as to whether the browser properly supports setting alignment properties on tables cells.
static java.lang.String EXCEPTION_SUPPORT
          The property name referencing a boolean indicator as to whether the browser supports exception handling through try/catch blocks.
static java.lang.String FALSE
          A property value representing boolean false.
static java.lang.String HOST
          The property name referencing the hostname the client is contacting.
static java.lang.String INITIAL_WINDOW_HAS_MENU_BAR
          The property name referencing whether the initial browser window had a menu bar.
static java.lang.String INITIAL_WINDOW_HAS_STATUS_BAR
          The property name referencing whether the initial browser window had a status bar.
static java.lang.String INITIAL_WINDOW_HAS_TOOL_BAR
          The property name referencing whether the initial browser window had a tool bar.
static java.lang.String INITIAL_WINDOW_HEIGHT
          The property name referencing the height of the initial browser window.
static java.lang.String INITIAL_WINDOW_WIDTH
          The property name referencing the width of the initial browser window.
static java.lang.String JS_VERSION
          The property name referencing the browser's highest supported JavaScript version.
private static java.lang.String MSIE
          An app name substring that identifies Microsoft Internet Explorer browsers.
private static java.lang.String NETSCAPE
          An app name substring that identifies Netscape browsers.
private static java.lang.String OPERA
          An app name substring that identifies Opera browsers.
private  java.util.Map properties
          A mapping of property names to property values.
static java.lang.String REFERRER
          The property name referencing the URI that referred the client browser to the Echo application.
static java.lang.String REMOTE_ADDR
          The property name referencing the client machine's IP Address
static java.lang.String REMOTE_HOST
          The property name referencing the client machine's fully qualified host name.
static java.lang.String SCREEN_HEIGHT
          The property name referencing the client machine's vertical screen resolution.
static java.lang.String SCREEN_WIDTH
          The property name referencing the client machine's horizontal screen resolution.
static java.lang.String TIME_ZONE_OFFSET
          The property name referencing the client machine's time zone offset.
static java.lang.String TRUE
          A property value representing boolean true.
static java.lang.String USER_AGENT
          The property name referencing the client machine's user agent.
 
Constructor Summary
(package private) ClientProperties(Connection conn)
          Creates a new client properties object.
 
Method Summary
 java.lang.String get(java.lang.String name)
          Returns the specified client property.
 boolean getBoolean(java.lang.String name)
          Returns the specified client property as a boolean value.
 java.lang.String toString()
          Outputs all data held in this ClientProperties object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NETSCAPE

private static final java.lang.String NETSCAPE
An app name substring that identifies Netscape browsers.

See Also:
Constant Field Values

MSIE

private static final java.lang.String MSIE
An app name substring that identifies Microsoft Internet Explorer browsers.

See Also:
Constant Field Values

OPERA

private static final java.lang.String OPERA
An app name substring that identifies Opera browsers.

See Also:
Constant Field Values

ACCEPT

public static final java.lang.String ACCEPT
The property name referencing the client's accepted response content types.

See Also:
Constant Field Values

ACCEPT_CHARSET

public static final java.lang.String ACCEPT_CHARSET
The property name referencing the client's accepted character sets.

See Also:
Constant Field Values

ACCEPT_ENCODING

public static final java.lang.String ACCEPT_ENCODING
The property name referencing the client's accepted character encodings.

See Also:
Constant Field Values

ACCEPT_LANGUAGE

public static final java.lang.String ACCEPT_LANGUAGE
The property name referencing the client's accepted languages.

See Also:
Constant Field Values

APP_NAME

public static final java.lang.String APP_NAME
The property name referencing the browser's application name.

See Also:
Constant Field Values

APP_VERSION

public static final java.lang.String APP_VERSION
The property name referencing the browser's version string.

See Also:
Constant Field Values

BACK_BUTTON_DISABLE_SUPPORT

public static final java.lang.String BACK_BUTTON_DISABLE_SUPPORT
The property name referencing whether the browser will allow the back button to be effectively disabled by placing a history.go(1) method call in the controller frame.

See Also:
Constant Field Values

CHROME_HEIGHT

public static final java.lang.String CHROME_HEIGHT
The property name referencing the browser's "chrome height".

See Also:
Constant Field Values

CHROME_WIDTH

public static final java.lang.String CHROME_WIDTH
The property name referencing the browser's "chrome width".

See Also:
Constant Field Values

COLOR_DEPTH

public static final java.lang.String COLOR_DEPTH
The property name referencing the client machine's video color depth.

See Also:
Constant Field Values

CSS_MODIFICATION_SUPPORT

public static final java.lang.String CSS_MODIFICATION_SUPPORT
The property name referencing a boolean indicator as to whether the browser supports dynamic modification of CSS styles.

See Also:
Constant Field Values

CSS_TABLE_CELL_ALIGNMENT_SUPPORT

public static final java.lang.String CSS_TABLE_CELL_ALIGNMENT_SUPPORT
The property name referencing a boolean indicator as to whether the browser properly supports setting alignment properties on tables cells. This property exists because Mozilla 1.0-1.2b (and possibly higher) and Opera 6.0 (and possibly higher) do not respect table cell alignment settings when the cell contains another table. Therefore alignment attributes will be rendered directly in table cell elements instead of in CSS when such support is lacking.

See Also:
Constant Field Values

EXCEPTION_SUPPORT

public static final java.lang.String EXCEPTION_SUPPORT
The property name referencing a boolean indicator as to whether the browser supports exception handling through try/catch blocks.

See Also:
Constant Field Values

HOST

public static final java.lang.String HOST
The property name referencing the hostname the client is contacting.

See Also:
Constant Field Values

INITIAL_WINDOW_HEIGHT

public static final java.lang.String INITIAL_WINDOW_HEIGHT
The property name referencing the height of the initial browser window.

See Also:
Constant Field Values

INITIAL_WINDOW_WIDTH

public static final java.lang.String INITIAL_WINDOW_WIDTH
The property name referencing the width of the initial browser window.

See Also:
Constant Field Values

INITIAL_WINDOW_HAS_MENU_BAR

public static final java.lang.String INITIAL_WINDOW_HAS_MENU_BAR
The property name referencing whether the initial browser window had a menu bar.

See Also:
Constant Field Values

INITIAL_WINDOW_HAS_STATUS_BAR

public static final java.lang.String INITIAL_WINDOW_HAS_STATUS_BAR
The property name referencing whether the initial browser window had a status bar.

See Also:
Constant Field Values

INITIAL_WINDOW_HAS_TOOL_BAR

public static final java.lang.String INITIAL_WINDOW_HAS_TOOL_BAR
The property name referencing whether the initial browser window had a tool bar.

See Also:
Constant Field Values

JS_VERSION

public static final java.lang.String JS_VERSION
The property name referencing the browser's highest supported JavaScript version.

See Also:
Constant Field Values

REFERRER

public static final java.lang.String REFERRER
The property name referencing the URI that referred the client browser to the Echo application. Note that the actual HTTP header is spelled "referer", but was misspelled in the HTTP specification.

See Also:
Constant Field Values

REMOTE_ADDR

public static final java.lang.String REMOTE_ADDR
The property name referencing the client machine's IP Address

See Also:
Constant Field Values

REMOTE_HOST

public static final java.lang.String REMOTE_HOST
The property name referencing the client machine's fully qualified host name.

See Also:
Constant Field Values

SCREEN_HEIGHT

public static final java.lang.String SCREEN_HEIGHT
The property name referencing the client machine's vertical screen resolution.

See Also:
Constant Field Values

SCREEN_WIDTH

public static final java.lang.String SCREEN_WIDTH
The property name referencing the client machine's horizontal screen resolution.

See Also:
Constant Field Values

TIME_ZONE_OFFSET

public static final java.lang.String TIME_ZONE_OFFSET
The property name referencing the client machine's time zone offset. This property indicates the difference in minutes between GMT (UTC) and the client's time.

See Also:
Constant Field Values

USER_AGENT

public static final java.lang.String USER_AGENT
The property name referencing the client machine's user agent.

See Also:
Constant Field Values

TRUE

public static final java.lang.String TRUE
A property value representing boolean true.

See Also:
Constant Field Values

FALSE

public static final java.lang.String FALSE
A property value representing boolean false.

See Also:
Constant Field Values

properties

private java.util.Map properties
A mapping of property names to property values.

Constructor Detail

ClientProperties

ClientProperties(Connection conn)
Creates a new client properties object. The connection must wrap the HttpRequest containing the form data submitted by the client detection page.

Parameters:
conn - A connection that wraps the HttpRequest containing the form data submitted by the client detection page.
Method Detail

get

public java.lang.String get(java.lang.String name)
Returns the specified client property.

Parameters:
name - The name of the property. Use the constants provided in this class.
Returns:
The value of the property.

getBoolean

public boolean getBoolean(java.lang.String name)
Returns the specified client property as a boolean value. True is returned in the event that the string value of the property is equal to "1".

Parameters:
name - The name of the property. Use the constants provided in this class.
Returns:
The boolean value of the property.

toString

public java.lang.String toString()
Outputs all data held in this ClientProperties object. Useful only for debugging or logging purposes.

Returns:
A string representation of this object.

NextApp Echo
App Container 1.0.5