Package com.meterware.httpunit

# Class WebConversation

java.lang.Object
com.meterware.httpunit.WebClient
com.meterware.httpunit.WebConversation

public class WebConversation extends WebClient
The context for a series of HTTP requests. This class manages cookies used to maintain session context, computes relative URLs, and generally emulates the browser behavior needed to build an automated test of a web site.

Author:
  Russell Gold

## Nested Class Summary

## Nested classes/interfaces inherited from class com.meterware.httpunit.WebClient

`WebClient.HeaderDictionary`

## Constructor Summary

Constructors
Constructor
Description
`WebConversation()`
Creates a new web conversation.

## Method Summary

Modifier and Type
Method
Description
`void`
`clearProxyServer()`
Clears the proxy server settings.
`int`
`get_connectTimeout()`
`int`
`get_readTimeout()`
`protected WebResponse`
`newResponse(WebRequest request, FrameSelector targetFrame)`
Creates a web response object which represents the response to the specified web request.
`void`
`set_connectTimeout(int timeout)`
set the connectionTimout -1 means it is not set (the default)
`void`
`set_readTimeout(int timeout)`
`void`
`setProxyServer(String proxyHost, int proxyPort)`
set the proxy server to the given proxyHost with the given proxy Port

### Methods inherited from class com.meterware.httpunit.WebClient

`addClientListener, addCookie, addWindowListener, clearContents, getClientProperties, getCookieDetails, getCookieJar, getCookieNames, getCookieValue, getCurrentPage, getExceptionsThrownOnErrorStatus, getFrameContents, getFrameContents, getFrameNames, getHeaderField, getHeaderFields, getMainWindow, getNextAlert, getOpenWindow, getOpenWindows, getProxyHost, getProxyPort, getResource, getResponse, getResponse, getUserAgent, popNextAlert, putCookie, removeClientListener, removeWindowListener, sendRequest, setAuthentication, setAuthorization, setDialogResponder, setExceptionsThrownOnErrorStatus, setHeaderField, setMainWindow, setProxyServer, setUserAgent, updateMainWindow, writeMessageBody`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### WebConversation

public WebConversation()
Creates a new web conversation.

## Method Details

### newResponse

protected WebResponse newResponse(WebRequest request, FrameSelector targetFrame) throws MalformedURLException, IOException
Creates a web response object which represents the response to the specified web request.

Specified by:
  `newResponse` in class `WebClient`
Parameters:
  `request` - the request to which the response should be generated
  `targetFrame` - the frame in which the response should be stored
Throws:
  `MalformedURLException`
  `IOException`

### clearProxyServer

public void clearProxyServer()
Description copied from class: `WebClient`
Clears the proxy server settings.

Overrides:
  `clearProxyServer` in class `WebClient`

### setProxyServer

public void setProxyServer(String proxyHost, int proxyPort)
set the proxy server to the given proxyHost with the given proxy Port

Specified by:
  `setProxyServer` in class `WebClient`
Parameters:
  `proxyHost` - - the hostname of the proxy e.g. proxy.somedomain.org
  `proxyPort` - - the number of the port to use e.g. 8080

### get_connectTimeout

public int get_connectTimeout()

Returns:
  the _connectTimeout -1 means it is not set (the default)

### set_connectTimeout

public void set_connectTimeout(int timeout)
set the connectionTimout -1 means it is not set (the default)

Parameters:
  `timeout` - the _connectTimeout to set

### get_readTimeout

public int get_readTimeout()

Returns:
  the _readTimeout -1 means it is not set (the default)

### set_readTimeout

public void set_readTimeout(int timeout)

Parameters:
  `timeout` - the _readTimeout to set -1 means it is not set (the default)