org.jboss.jsfunit.jsfsession
Class HtmlUnitSnooper

java.lang.Object
  extended by org.jboss.jsfunit.jsfsession.HtmlUnitSnooper
All Implemented Interfaces:
RequestListener

public class HtmlUnitSnooper
extends Object
implements RequestListener

RequestListener outputs before and after each request made by HtmlUnit. It outputs the messages to standard out. To enable, set system property jsfunit.htmlunitsnooper.

Since:
1.0
Author:
Stan Silvert

Field Summary
static String SNOOP_PROPERTY
           
 
Constructor Summary
HtmlUnitSnooper()
           
 
Method Summary
 void afterRequest(com.gargoylesoftware.htmlunit.WebResponse webResponse)
          This is called after the request is over.
 void beforeRequest(com.gargoylesoftware.htmlunit.WebRequest webRequest)
          This is called before HtmlUnit makes a request to the server.
static boolean enabled()
          Check to see if HtmlUnit snooping is enabled.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SNOOP_PROPERTY

public static final String SNOOP_PROPERTY
See Also:
Constant Field Values
Constructor Detail

HtmlUnitSnooper

public HtmlUnitSnooper()
Method Detail

enabled

public static boolean enabled()
Check to see if HtmlUnit snooping is enabled.

Returns:
true if enabled, false otherwise.

beforeRequest

public void beforeRequest(com.gargoylesoftware.htmlunit.WebRequest webRequest)
Description copied from interface: RequestListener
This is called before HtmlUnit makes a request to the server.

Specified by:
beforeRequest in interface RequestListener
Parameters:
webRequest - The settings for the request.

afterRequest

public void afterRequest(com.gargoylesoftware.htmlunit.WebResponse webResponse)
Description copied from interface: RequestListener
This is called after the request is over. In the case that the request throws an IOException, the webResponse will be null.

Specified by:
afterRequest in interface RequestListener
Parameters:
webResponse - The response, or null if the request threw an IOException.


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