glenn       01/03/25 19:22:14

  Modified:    catalina/src/share/org/apache/catalina Deployer.java
  Log:
  Improve webapp unpack WAR file behaviour and enhance manager servlet
  
  Revision  Changes    Path
  1.2       +55 -23    
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Deployer.java
  
  Index: Deployer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Deployer.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Deployer.java     2000/10/04 23:03:03     1.1
  +++ Deployer.java     2001/03/26 03:22:14     1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Deployer.java,v 
1.1 2000/10/04 23:03:03 craigmcc Exp $
  - * $Revision: 1.1 $
  - * $Date: 2000/10/04 23:03:03 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Deployer.java,v 
1.2 2001/03/26 03:22:14 glenn Exp $
  + * $Revision: 1.2 $
  + * $Date: 2001/03/26 03:22:14 $
    *
    * ====================================================================
    *
  @@ -76,7 +76,7 @@
    * for each web application will be the context path to which it is attached.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.1 $ $Date: 2000/10/04 23:03:03 $
  + * @version $Revision: 1.2 $ $Date: 2001/03/26 03:22:14 $
    */
   
   public interface Deployer extends Container {
  @@ -87,46 +87,46 @@
   
       /**
        * The ContainerEvent event type sent when a new application is
  -     * deployed by <code>deploy()</code>.
  +     * installed by <code>install()</code>.
        */
  -    public static final String DEPLOY_EVENT = "deploy";
  +    public static final String INSTALL_EVENT = "install";
   
   
       /**
        * The ContainerEvent event type sent when an existing application is
  -     * undeployed by <code>undeploy()</code>.
  +     * removed by <code>remove()</code>.
        */
  -    public static final String UNDEPLOY_EVENT = "undeploy";
  +    public static final String REMOVE_EVENT = "remove";
   
   
       // --------------------------------------------------------- Public Methods
   
   
       /**
  -     * Deploy a new web application, whose web application archive is at the
  +     * Install a new web application, whose web application archive is at the
        * specified URL, into this container with the specified context path.
        * A context path of "" (the empty string) should be used for the root
        * application for this container.  Otherwise, the context path must
        * start with a slash.
        * <p>
  -     * If this application is successfully deployed, a ContainerEvent of type
  -     * <code>DEPLOY_EVENT</code> will be sent to all registered listeners,
  +     * If this application is successfully installed, a ContainerEvent of type
  +     * <code>INSTALL_EVENT</code> will be sent to all registered listeners,
        * with the newly created <code>Context</code> as an argument.
        *
        * @param contextPath The context path to which this application should
  -     *  be deployed (must be unique)
  +     *  be installed (must be unique)
        * @param war A URL of type "jar:" that points to a WAR file, or type
        *  "file:" that points to an unpacked directory structure containing
  -     *  the web application to be deployed
  +     *  the web application to be installed
        *
        * @exception IllegalArgumentException if the specified context path
        *  is malformed (it must be "" or start with a slash)
        * @exception IllegalArgumentException if the specified context path
        *  is already attached to an existing web application
        * @exception IOException if an input/output error was encountered
  -     *  during deployment
  +     *  during installation
        */
  -    public void deploy(String contextPath, URL war) throws IOException;
  +    public void install(String contextPath, URL war) throws IOException;
   
   
       /**
  @@ -148,22 +148,54 @@
   
   
       /**
  -     * Undeploy an existing web application, attached to the specified context
  -     * path.  If this application is successfully undeployed, a
  -     * ContainerEvent of type <code>UNDEPLOY_EVENT</code> will be sent to all
  -     * registered listeners, with the undeployed <code>Context</code> as
  +     * Remove an existing web application, attached to the specified context
  +     * path.  If this application is successfully removed, a
  +     * ContainerEvent of type <code>REMOVE_EVENT</code> will be sent to all
  +     * registered listeners, with the removed <code>Context</code> as
        * an argument.
        *
  -     * @param contextPath The context path of the application to be undeployed
  +     * @param contextPath The context path of the application to be removed
        *
        * @exception IllegalArgumentException if the specified context path
        *  is malformed (it must be "" or start with a slash)
        * @exception IllegalArgumentException if the specified context path does
  -     *  not identify a currently deployed web application
  +     *  not identify a currently installed web application
        * @exception IOException if an input/output error occurs during
  -     *  undeployment
  +     *  removal
        */
  -    public void undeploy(String contextPath) throws IOException;
  +    public void remove(String contextPath) throws IOException;
  +
  +
  +    /**
  +     * Start an existing web application, attached to the specified context
  +     * path.  Only starts a web application if it is not running.
  +     *                             
  +     * @param contextPath The context path of the application to be started
  +     *                             
  +     * @exception IllegalArgumentException if the specified context path
  +     *  is malformed (it must be "" or start with a slash)
  +     * @exception IllegalArgumentException if the specified context path does
  +     *  not identify a currently installed web application
  +     * @exception IOException if an input/output error occurs during
  +     *  startup
  +     */                            
  +    public void start(String contextPath) throws IOException;
  +
  +
  +    /**
  +     * Stop an existing web application, attached to the specified context
  +     * path.  Only stops a web application if it is running.
  +     *
  +     * @param contextPath The context path of the application to be stopped
  +     *
  +     * @exception IllegalArgumentException if the specified context path
  +     *  is malformed (it must be "" or start with a slash)
  +     * @exception IllegalArgumentException if the specified context path does
  +     *  not identify a currently installed web application
  +     * @exception IOException if an input/output error occurs while stopping
  +     *  the web application
  +     */
  +    public void stop(String contextPath) throws IOException;
   
   
   }
  
  
  

Reply via email to