org.jboss.jsfunit.framework
Class JSFUnitWebConnection

java.lang.Object
  extended by org.jboss.jsfunit.framework.JSFUnitWebConnection
All Implemented Interfaces:
com.gargoylesoftware.htmlunit.WebConnection

public class JSFUnitWebConnection
extends Object
implements com.gargoylesoftware.htmlunit.WebConnection

The JSFUnitWebConnection wraps the HtmlUnit WebConnection. It allows listeners to register for events before and after any HTTP request on the client side.

Since:
1.0
Author:
Stan Silvert

Constructor Summary
JSFUnitWebConnection(com.gargoylesoftware.htmlunit.WebConnection wrappedConnection)
          Create a new JSFUnitWebConnection
 
Method Summary
 void addListener(RequestListener listener)
          Add a RequestListener to be notified whenever an HTTP request is made to the server.
 com.gargoylesoftware.htmlunit.WebResponse getResponse(com.gargoylesoftware.htmlunit.WebRequest webRequest)
          Called by HtmlUnit whenever a request is made to the server.
 void removeListener(RequestListener listener)
          Remove a RequestListener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSFUnitWebConnection

public JSFUnitWebConnection(com.gargoylesoftware.htmlunit.WebConnection wrappedConnection)
Create a new JSFUnitWebConnection

Parameters:
wrappedConnection - The wrappedConnection (normally obtained from the HtmlUnit WebClient
Method Detail

getResponse

public com.gargoylesoftware.htmlunit.WebResponse getResponse(com.gargoylesoftware.htmlunit.WebRequest webRequest)
                                                      throws IOException
Called by HtmlUnit whenever a request is made to the server.

Specified by:
getResponse in interface com.gargoylesoftware.htmlunit.WebConnection
Parameters:
webRequest - The WebRequest
Returns:
The WebResponse
Throws:
IOException

addListener

public void addListener(RequestListener listener)
Add a RequestListener to be notified whenever an HTTP request is made to the server.

Parameters:
listener - The listener to register

removeListener

public void removeListener(RequestListener listener)
Remove a RequestListener.

Parameters:
listener - The listener to unregister


Copyright © 2007-2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.