vmassol     01/04/28 07:03:21

  Modified:    cactus/src/framework/share/org/apache/commons/cactus/client
                        AbstractHttpClient.java
  Log:
  refactoring + make some checks about user environment to ensure setup is fine (for 
example, check that the cactus.properties file is in the CLASSPATH)
  
  Revision  Changes    Path
  1.3       +21 -1     
jakarta-commons/cactus/src/framework/share/org/apache/commons/cactus/client/AbstractHttpClient.java
  
  Index: AbstractHttpClient.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/cactus/src/framework/share/org/apache/commons/cactus/client/AbstractHttpClient.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractHttpClient.java   2001/04/19 23:22:10     1.2
  +++ AbstractHttpClient.java   2001/04/28 14:03:21     1.3
  @@ -63,12 +63,32 @@
   /**
    * Abstract class that all HTTP clients to the server redirector must extend.
    * It provides a common abstraction of the <code>doTest</code> method and
  - * provides the URL to the server redirector servlet or JSP.
  + * 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 <code>ClientConfigurationChecker</code> class for details).
    *
    * @version @version@
    */
   public abstract class AbstractHttpClient
   {
  +    /**
  +     * Name of the Cactus configuration file
  +     */
  +    public final static String CONFIG_NAME = "cactus";
  +
  +    /**
  +     * Properties file holding configuration data for Cactus.
  +     */
  +    public final static ResourceBundle CONFIG =
  +        PropertyResourceBundle.getBundle(CONFIG_NAME);
  +
  +    /**
  +     * Check client configuration parameters.
  +     */
  +    static {
  +        ClientConfigurationChecker.checkConfigProperties();
  +    }
  +
       /**
        * Calls the test method indirectly by calling the Redirector servlet and
        * then open a second HTTP connection to retrieve the test results.
  
  
  

Reply via email to