tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/connectors/include wa_main.h
Date Thu, 10 May 2001 09:02:48 GMT
pier        01/05/10 02:02:48

  Modified:    connectors/include wa_main.h
  Log:
  Moved the wa_provider structure from wa_provider.h
  
  Revision  Changes    Path
  1.3       +101 -4    jakarta-tomcat-4.0/connectors/include/wa_main.h
  
  Index: wa_main.h
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/connectors/include/wa_main.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- wa_main.h	2001/05/10 06:25:58	1.2
  +++ wa_main.h	2001/05/10 09:02:45	1.3
  @@ -58,7 +58,7 @@
   /**
    * @package Main
    * @author  Pier Fumagalli <mailto:pier.fumagalli@eng.sun.com>
  - * @version $Id: wa_main.h,v 1.2 2001/05/10 06:25:58 pier Exp $
  + * @version $Id: wa_main.h,v 1.3 2001/05/10 09:02:45 pier Exp $
    */
   #ifndef _WA_MAIN_H_
   #define _WA_MAIN_H_
  @@ -76,6 +76,90 @@
   };
   
   /**
  + * The WebApp Library connection provider structure.
  + * <br>
  + * This structure contains all data and function pointers to be implemented
  + * by a connection provider.
  + */
  +struct wa_provider {
  +    /**
  +     * The name of this provider.
  +     */
  +    const char *name;
  +
  +    /**
  +     * Initialize a provider.
  +     * <br>
  +     * This function is called when the WebApp Library is initialized, before
  +     * any web application is deployed.
  +     *
  +     * @return An error message or NULL.
  +     */
  +    const char *(*init)(void);
  +
  +    /**
  +     * Notify the provider of its imminent startup.
  +     * <br>
  +     * After all configurations are generated, this function is called to
  +     * notify the provider to expect requests to be handled.
  +     */
  +    void (*startup)(void);
  +
  +    /**
  +     * Cleans up all resources allocated by the provider.
  +     * <br>
  +     * The provider is notified that no further requests will be handled, and
  +     * the WebApp library is being destroyed.
  +     */
  +    void (*destroy)(void);
  +
  +    /**
  +     * Configure a connection with the parameter from the web server
  +     * configuration file.
  +     *
  +     * @param conn The connection to configure.
  +     * @param param The extra parameter from web server configuration.
  +     * @return An error message or NULL.
  +     */
  +    const char *(*connect)(wa_connection *conn, const char *param);
  +
  +    /**
  +     * Receive notification of the deployment of an application.
  +     *
  +     * @param appl The application being deployed.
  +     * @return An error message or NULL.
  +     */
  +    const char *(*deploy)(wa_application *appl);
  +
  +    /**
  +     * Describe the configuration member found in a connection.
  +     *
  +     * @param conn The connection for wich a description must be produced.
  +     * @param pool The memory pool where the returned string must be allocated.
  +     * @return The description for a connection configuration or <b>NULL</b>.
  +     */
  +    char *(*conninfo)(wa_connection *conn, apr_pool_t *pool);
  +
  +    /**
  +     * Describe the configuration member found in a web application.
  +     *
  +     * @param appl The application for wich a description must be produced.
  +     * @param pool The memory pool where the returned string must be allocated.
  +     * @return The description for an application configuration or <b>NULL</b>.
  +     */
  +    char *(*applinfo)(wa_application *appl, apr_pool_t *pool);
  +
  +    /**
  +     * Handle a connection from the web server.
  +     *
  +     * @param req The request data.
  +     * @param appl The application associated with the request.
  +     * @param return The HTTP status code of the response.
  +     */
  +    int (*handle)(wa_request *req, wa_application *appl);
  +};
  +
  +/**
    * Initialize the WebApp Library.
    * This function must be called <b>before</b> any other calls to any other
    * function to set up the APR and WebApp Library internals. If any other
  @@ -92,12 +176,19 @@
    * and must be called before the underlying web server process exits. Any call
    * to any other WebApp Library function after this function has been invoked
    * will result in impredictable results.
  - *
  - * @return <b>NULL</b> on success or an error message on faliure.
    */
  -const char *wa_destroy(void);
  +void wa_startup(void);
   
   /**
  + * Clean up the WebApp Library.
  + * This function releases all memory and resouces used by the WebApp library
  + * and must be called before the underlying web server process exits. Any call
  + * to any other WebApp Library function after this function has been invoked
  + * will result in impredictable results.
  + */
  +void wa_destroy(void);
  +
  +/**
    * Deploy a web-application.
    *
    * @param a The <code>wa_application</code> member of the web-application to
  @@ -140,5 +231,11 @@
    * members can be retrieved.
    */
   extern wa_chain *wa_configuration;
  +
  +/**
  + * A <b>NULL</b>-terminated array of all compiled-in <code>wa_provider</code>
  + * members.
  + */
  +extern wa_provider *wa_providers[];
   
   #endif /* ifndef _WA_MAIN_H_ */
  
  
  

Mime
View raw message