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

Quick Search    Search Deep

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

java.lang.Object
  extended bycom.meterware.httpunit.WebClient
      extended bycom.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.


Nested Class Summary
 
Nested classes inherited from class com.meterware.httpunit.WebClient
WebClient.HeaderDictionary
 
Field Summary
private  java.lang.String _proxyHost
           
private  int _proxyPort
           
 
Fields inherited from class com.meterware.httpunit.WebClient
 
Constructor Summary
WebConversation()
          Creates a new web conversation.
 
Method Summary
 void clearProxyServer()
          Clears the proxy server settings.
private  java.net.URL getRequestURL(WebRequest request)
           
protected  WebResponse newResponse(WebRequest request, FrameSelector targetFrame)
          Creates a web response object which represents the response to the specified web request.
private  java.net.URLConnection openConnection(java.net.URL url)
           
private  void sendHeaders(java.net.URLConnection connection, java.util.Dictionary headers)
           
 void setProxyServer(java.lang.String proxyHost, int proxyPort)
          Specifies a proxy server to use for requests from this client.
 
Methods inherited from class com.meterware.httpunit.WebClient
addClientListener, addCookie, addWindowListener, clearContents, close, findFrame, getClientProperties, getConfirmationResponse, getCookieJar, getCookieNames, getCookieValue, getCurrentPage, getExceptionsThrownOnErrorStatus, getFrameContents, getFrameContents, getFrameNames, getHeaderField, getHeaderFields, getMainWindow, getNextAlert, getOpenWindow, getOpenWindows, getProxyHost, getProxyPort, getResource, getResponse, getResponse, getUserAgent, getUserResponse, popNextAlert, postAlert, putCookie, removeClientListener, removeWindowListener, sendRequest, setAuthorization, setDialogResponder, setExceptionsThrownOnErrorStatus, setHeaderField, setMainWindow, setProxyServer, setUserAgent, tellListeners, tellListeners, updateClient, updateFrameContents, updateMainWindow, writeMessageBody
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_proxyHost

private java.lang.String _proxyHost

_proxyPort

private int _proxyPort
Constructor Detail

WebConversation

public WebConversation()
Creates a new web conversation.

Method Detail

newResponse

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

Specified by:
newResponse in class WebClient

clearProxyServer

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

Overrides:
clearProxyServer in class WebClient

setProxyServer

public void setProxyServer(java.lang.String proxyHost,
                           int proxyPort)
Description copied from class: WebClient
Specifies a proxy server to use for requests from this client.

Overrides:
setProxyServer in class WebClient

getRequestURL

private java.net.URL getRequestURL(WebRequest request)
                            throws java.net.MalformedURLException

openConnection

private java.net.URLConnection openConnection(java.net.URL url)
                                       throws java.net.MalformedURLException,
                                              java.io.IOException

sendHeaders

private void sendHeaders(java.net.URLConnection connection,
                         java.util.Dictionary headers)