org.apache.commons.cactus.client
Class ServletHttpClient

java.lang.Object
  |
  +--org.apache.commons.cactus.client.AbstractHttpClient
        |
        +--org.apache.commons.cactus.client.ServletHttpClient

public class ServletHttpClient
extends AbstractHttpClient

Manage the logic for calling a test method (which need access to Servlet objects) located on the server side. First opens an HTTP connection to the redirector servlet (which in trun calls the test) and get the test results by opening a second HTTP connection but to the redirector servlet (the tests were saved in the application context scope).

Version:
1.1

Fields inherited from class org.apache.commons.cactus.client.AbstractHttpClient
CONFIG, CONFIG_NAME
 
Constructor Summary
ServletHttpClient()
           
 
Method Summary
 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
 

Constructor Detail

ServletHttpClient

public ServletHttpClient()
Method Detail

doTest

public 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.
Overrides:
doTest in class AbstractHttpClient
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.