Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.meterware.httpunit
Class ClientProperties  view ClientProperties download ClientProperties.java

java.lang.Object
  extended bycom.meterware.httpunit.ClientProperties

public class ClientProperties
extends java.lang.Object

A class which represents the properties of a web client.


Field Summary
private  boolean _acceptCookies
           
private  boolean _acceptGzip
           
private  java.lang.String _applicationCodeName
           
private  java.lang.String _applicationName
           
private  java.lang.String _applicationVersion
           
private  boolean _autoRedirect
           
private  boolean _autoRefresh
           
private  int _availHeight
           
private  int _availWidth
           
private static ClientProperties _defaultProperties
           
private  DNSListener _dnsListener
           
private  boolean _iframeSupported
           
private  java.lang.String _platform
           
private  java.lang.String _userAgent
           
 
Constructor Summary
private ClientProperties()
           
private ClientProperties(ClientProperties source)
           
 
Method Summary
(package private)  ClientProperties cloneProperties()
           
 java.lang.String getApplicationCodeName()
           
 java.lang.String getApplicationName()
           
 java.lang.String getApplicationVersion()
           
 int getAvailableScreenWidth()
           
 int getAvailHeight()
           
static ClientProperties getDefaultProperties()
          Returns the current defaults for newly created web clients.
(package private)  DNSListener getDnsListener()
          Returns the listener for DNS requests to be used by the client.
 java.lang.String getPlatform()
           
 java.lang.String getUserAgent()
          Returns the user agent identification.
 boolean isAcceptCookies()
          Returns true if the client should accept and transmit cookies.
 boolean isAcceptGzip()
          Returns true if the client will accept GZIP encoding of responses.
 boolean isAutoRedirect()
          Returns true if the client should automatically follow page redirect requests (status 3xx).
 boolean isAutoRefresh()
          Returns true if the client should automatically follow page refresh requests.
 boolean isIframeSupported()
           
 void setAcceptCookies(boolean acceptCookies)
          Specifies whether the client should accept and send cookies.
 void setAcceptGzip(boolean acceptGzip)
          Specifies whether the client will accept GZIP encoded responses.
 void setApplicationCodeName(java.lang.String applicationCodeName)
           
 void setApplicationID(java.lang.String applicationName, java.lang.String applicationCodeName, java.lang.String applicationVersion)
          Specifies the ID information for a client.
 void setApplicationName(java.lang.String applicationName)
           
 void setApplicationVersion(java.lang.String applicationVersion)
           
 void setAutoRedirect(boolean autoRedirect)
          Determines whether the client should automatically follow page redirect requests (status 3xx).
 void setAutoRefresh(boolean autoRefresh)
          Specifies whether the client should automatically follow page refresh requests.
 void setAvailableScreenSize(int width, int height)
          A shortcut for setting both availableScreenWidth and availableScreenHeight at one time.
 void setAvailableScreenWidth(int availWidth)
           
 void setAvailHeight(int availHeight)
           
 void setDnsListener(DNSListener dnsListener)
          Specifies a listener for DNS requests from the client.
 void setIframeSupported(boolean iframeSupported)
           
 void setPlatform(java.lang.String platform)
           
 void setUserAgent(java.lang.String userAgent)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_applicationCodeName

private java.lang.String _applicationCodeName

_applicationName

private java.lang.String _applicationName

_applicationVersion

private java.lang.String _applicationVersion

_userAgent

private java.lang.String _userAgent

_platform

private java.lang.String _platform

_availWidth

private int _availWidth

_availHeight

private int _availHeight

_iframeSupported

private boolean _iframeSupported

_acceptCookies

private boolean _acceptCookies

_acceptGzip

private boolean _acceptGzip

_autoRedirect

private boolean _autoRedirect

_autoRefresh

private boolean _autoRefresh

_dnsListener

private DNSListener _dnsListener

_defaultProperties

private static ClientProperties _defaultProperties
Constructor Detail

ClientProperties

private ClientProperties()

ClientProperties

private ClientProperties(ClientProperties source)
Method Detail

getDefaultProperties

public static ClientProperties getDefaultProperties()
Returns the current defaults for newly created web clients.


setApplicationID

public void setApplicationID(java.lang.String applicationName,
                             java.lang.String applicationCodeName,
                             java.lang.String applicationVersion)
Specifies the ID information for a client.


getApplicationCodeName

public java.lang.String getApplicationCodeName()

setApplicationCodeName

public void setApplicationCodeName(java.lang.String applicationCodeName)

getApplicationName

public java.lang.String getApplicationName()

setApplicationName

public void setApplicationName(java.lang.String applicationName)

getApplicationVersion

public java.lang.String getApplicationVersion()

setApplicationVersion

public void setApplicationVersion(java.lang.String applicationVersion)

getUserAgent

public java.lang.String getUserAgent()
Returns the user agent identification. Unless this has been set explicitly, it will default to the application code name followed by a slash and the application version.


setUserAgent

public void setUserAgent(java.lang.String userAgent)

getPlatform

public java.lang.String getPlatform()

setPlatform

public void setPlatform(java.lang.String platform)

setAvailableScreenSize

public void setAvailableScreenSize(int width,
                                   int height)
A shortcut for setting both availableScreenWidth and availableScreenHeight at one time.


getAvailableScreenWidth

public int getAvailableScreenWidth()

setAvailableScreenWidth

public void setAvailableScreenWidth(int availWidth)

getAvailHeight

public int getAvailHeight()

setAvailHeight

public void setAvailHeight(int availHeight)

isAcceptCookies

public boolean isAcceptCookies()
Returns true if the client should accept and transmit cookies. The default is to accept them.


setAcceptCookies

public void setAcceptCookies(boolean acceptCookies)
Specifies whether the client should accept and send cookies.


isAcceptGzip

public boolean isAcceptGzip()
Returns true if the client will accept GZIP encoding of responses. The default is to accept GZIP encoding.


setAcceptGzip

public void setAcceptGzip(boolean acceptGzip)
Specifies whether the client will accept GZIP encoded responses. The default is true.


isAutoRedirect

public boolean isAutoRedirect()
Returns true if the client should automatically follow page redirect requests (status 3xx). By default, this is true.


setAutoRedirect

public void setAutoRedirect(boolean autoRedirect)
Determines whether the client should automatically follow page redirect requests (status 3xx). By default, this is true in order to simulate normal browser operation.


isAutoRefresh

public boolean isAutoRefresh()
Returns true if the client should automatically follow page refresh requests. By default, this is false, so that programs can verify the redirect page presented to users before the browser switches to the new page.


setAutoRefresh

public void setAutoRefresh(boolean autoRefresh)
Specifies whether the client should automatically follow page refresh requests. By default, this is false, so that programs can verify the redirect page presented to users before the browser switches to the new page. Setting this to true can cause an infinite loop on pages that refresh themselves.


isIframeSupported

public boolean isIframeSupported()

setIframeSupported

public void setIframeSupported(boolean iframeSupported)

setDnsListener

public void setDnsListener(DNSListener dnsListener)
Specifies a listener for DNS requests from the client.


getDnsListener

DNSListener getDnsListener()
Returns the listener for DNS requests to be used by the client.


cloneProperties

ClientProperties cloneProperties()