org.apache.commons.cactus.client
Class AbstractHttpClient

java.lang.Object
  |
  +--org.apache.commons.cactus.client.AbstractHttpClient
Direct Known Subclasses:
JspHttpClient, ServletHttpClient

public abstract class AbstractHttpClient
extends java.lang.Object

Abstract class that all HTTP clients to the server redirector must extend. It provides a common abstraction of the doTest method and provides the URL to the server redirector servlet or JSP. It also makes some configuration checks to verify if the runtime configuration is right (see the ClientConfigurationChecker class for details).

Version:
1.0

Field Summary
static java.util.ResourceBundle CONFIG
          Properties file holding configuration data for Cactus.
static java.lang.String CONFIG_NAME
          Name of the Cactus configuration file
 
Constructor Summary
AbstractHttpClient()
           
 
Method Summary
abstract  java.net.HttpURLConnection doTest(ServletTestRequest theRequest)
          Calls the test method indirectly by calling the Redirector servlet and then open a second HTTP connection to retrieve the test results.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIG_NAME

public static final java.lang.String CONFIG_NAME
Name of the Cactus configuration file

CONFIG

public static final java.util.ResourceBundle CONFIG
Properties file holding configuration data for Cactus.
Constructor Detail

AbstractHttpClient

public AbstractHttpClient()
Method Detail

doTest

public abstract java.net.HttpURLConnection doTest(ServletTestRequest theRequest)
                                           throws java.lang.Throwable
Calls the test method indirectly by calling the Redirector servlet and then open a second HTTP connection to retrieve the test results.
Parameters:
theRequest - the request containing all data to pass to the redirector servlet.
Returns:
the HttpURLConnection that contains the HTTP response when the test was called.
Throws:
java.lang.Throwable - if an error occured in the test method or in the redirector servlet.


Copyright © 2000-2001 Apache Software Foundation. All Rights Reserved.