net.sf.jbenchmark
Class HttpGetTest

java.lang.Object
  extended bynet.sf.jbenchmark.TestFeature
      extended bynet.sf.jbenchmark.Test
          extended bynet.sf.jbenchmark.HttpGetTest
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
RandomHttpGet

public class HttpGetTest
extends Test

A test that fetches performs a GET of a particular URI.

Version:
$Id: HttpGetTest.java,v 1.8 2004/08/19 02:14:31 bdargan Exp $
Author:
Adam Murdoch

Constructor Summary
HttpGetTest()
           
 
Method Summary
protected  TestResult doRun()
          Executes the test.
protected  java.lang.String getNewPath()
          To be overridden by subclass.
 void setAcceptGZipEncoding(boolean useGZip)
          Sets whether the GZip encoding header should be added (defaults to true)
 void setPath(java.lang.String path)
          Sets the path.
 void setReuseState(boolean reuseState)
          Should state of client be reused
 
Methods inherited from class net.sf.jbenchmark.Test
addAssertion, addFeature, addResource, doCleanup, doInitialise, finish, getFeatureContext, getResource, run, setContext
 
Methods inherited from class net.sf.jbenchmark.TestFeature
getContext, getName, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HttpGetTest

public HttpGetTest()
Method Detail

setPath

public void setPath(java.lang.String path)
Sets the path.


setAcceptGZipEncoding

public void setAcceptGZipEncoding(boolean useGZip)
Sets whether the GZip encoding header should be added (defaults to true)


doRun

protected TestResult doRun()
                    throws java.lang.Exception
Executes the test.

Specified by:
doRun in class Test
Throws:
java.lang.Exception

getNewPath

protected java.lang.String getNewPath()
To be overridden by subclass. This is called on every request.

Returns:
the new path for the request.

setReuseState

public void setReuseState(boolean reuseState)
Should state of client be reused

Parameters:
reuseState -