Clover coverage report - Cactus 1.5 for J2EE API 1.3
Coverage timestamp: Wed Feb 18 2004 09:09:13 EST
file stats: LOC: 183   Methods: 0
NCLOC: 22   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
Container.java - - - -
coverage
 1   
 /*
 2   
  * ====================================================================
 3   
  *
 4   
  * The Apache Software License, Version 1.1
 5   
  *
 6   
  * Copyright (c) 2003 The Apache Software Foundation.  All rights
 7   
  * reserved.
 8   
  *
 9   
  * Redistribution and use in source and binary forms, with or without
 10   
  * modification, are permitted provided that the following conditions
 11   
  * are met:
 12   
  *
 13   
  * 1. Redistributions of source code must retain the above copyright
 14   
  *    notice, this list of conditions and the following disclaimer.
 15   
  *
 16   
  * 2. Redistributions in binary form must reproduce the above copyright
 17   
  *    notice, this list of conditions and the following disclaimer in
 18   
  *    the documentation and/or other materials provided with the
 19   
  *    distribution.
 20   
  *
 21   
  * 3. The end-user documentation included with the redistribution, if
 22   
  *    any, must include the following acknowlegement:
 23   
  *       "This product includes software developed by the
 24   
  *        Apache Software Foundation (http://www.apache.org/)."
 25   
  *    Alternately, this acknowlegement may appear in the software itself,
 26   
  *    if and wherever such third-party acknowlegements normally appear.
 27   
  *
 28   
  * 4. The names "The Jakarta Project", "Cactus" and "Apache Software
 29   
  *    Foundation" must not be used to endorse or promote products
 30   
  *    derived from this software without prior written permission. For
 31   
  *    written permission, please contact apache@apache.org.
 32   
  *
 33   
  * 5. Products derived from this software may not be called "Apache"
 34   
  *    nor may "Apache" appear in their names without prior written
 35   
  *    permission of the Apache Group.
 36   
  *
 37   
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 38   
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 39   
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 40   
  * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
 41   
  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 42   
  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 43   
  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 44   
  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 45   
  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 46   
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 47   
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 48   
  * SUCH DAMAGE.
 49   
  * ====================================================================
 50   
  *
 51   
  * This software consists of voluntary contributions made by many
 52   
  * individuals on behalf of the Apache Software Foundation.  For more
 53   
  * information on the Apache Software Foundation, please see
 54   
  * <http://www.apache.org/>.
 55   
  *
 56   
  */
 57   
 package org.apache.cactus.integration.ant.container;
 58   
 
 59   
 import java.io.File;
 60   
 
 61   
 import org.apache.cactus.integration.ant.util.AntTaskFactory;
 62   
 import org.apache.commons.logging.Log;
 63   
 import org.apache.tools.ant.types.Environment.Variable;
 64   
 
 65   
 /**
 66   
  * Interface for classes that can be used as nested elements in the
 67   
  * <code>&lt;containers&gt;</code> element of the <code>&lt;cactus&gt;</code>
 68   
  * task.
 69   
  * 
 70   
  * @author <a href="mailto:cmlenz@apache.org">Christopher Lenz</a>
 71   
  *
 72   
  * @version $Id: Container.java,v 1.4.2.2 2003/10/23 18:20:43 vmassol Exp $
 73   
  */
 74   
 public interface Container
 75   
 {
 76   
 
 77   
     // Public Methods ----------------------------------------------------------
 78   
 
 79   
     /**
 80   
      * Returns a displayable name of the container for logging purposes.
 81   
      * 
 82   
      * @return The container name
 83   
      */
 84   
     String getName();
 85   
 
 86   
     /**
 87   
      * Returns the port to which the container should listen.
 88   
      * 
 89   
      * @return The port
 90   
      */
 91   
     int getPort();
 92   
 
 93   
     /**
 94   
      * @return the time to wait after the container has been started up. 
 95   
      */
 96   
     long getStartUpWait();
 97   
     
 98   
     /**
 99   
      * Returns the value of the 'todir' attribute.
 100   
      * 
 101   
      * @return The output directory
 102   
      */
 103   
     File getToDir();
 104   
 
 105   
     /**
 106   
      * @return the list of system properties that will be set in the container 
 107   
      *         JVM
 108   
      */
 109   
     Variable[] getSystemProperties();
 110   
     
 111   
     /**
 112   
      * Subclasses should implement this method to perform any initialization
 113   
      * that may be necessary. This method is called before any of the accessors
 114   
      * or the methods {@link AbstractContainer#startUp} and
 115   
      * {@link AbstractContainer#shutDown} are called, but after all attributes
 116   
      * have been set.
 117   
      */
 118   
     void init();
 119   
 
 120   
     /**
 121   
      * Returns whether the container element is enabled, which is determined by
 122   
      * the evaluation of the if- and unless conditions
 123   
      * 
 124   
      * @return <code>true</code> if the container is enabled
 125   
      */
 126   
     boolean isEnabled();
 127   
 
 128   
     /**
 129   
      * Returns whether a specific test case is to be excluded from being run in
 130   
      * the container.
 131   
      * 
 132   
      * @param theTestName The fully qualified name of the test fixture class
 133   
      * @return <code>true</code> if the test should be excluded, otherwise
 134   
      *         <code>false</code>
 135   
      */
 136   
     boolean isExcluded(String theTestName);
 137   
 
 138   
     /**
 139   
      * Sets the factory to use for creating Ant tasks.
 140   
      * 
 141   
      * @param theFactory The factory to use for creating Ant tasks
 142   
      */
 143   
     void setAntTaskFactory(AntTaskFactory theFactory);
 144   
 
 145   
     /**
 146   
      * Sets the log which the implementation should use.
 147   
      *  
 148   
      * @param theLog The log to set
 149   
      */
 150   
     void setLog(Log theLog);
 151   
 
 152   
     /**
 153   
      * Sets the file that should be deployed to the container. This can be
 154   
      * either a WAR or an EAR file, depending on the capabilities of the
 155   
      * container.
 156   
      * 
 157   
      * @param theDeployableFile The file to deploy
 158   
      */
 159   
     void setDeployableFile(DeployableFile theDeployableFile);
 160   
 
 161   
     /**
 162   
      * Sets the system properties that will be passed to the JVM in which the
 163   
      * server will execute.
 164   
      * 
 165   
      * @param theProperties the list of system properties to set in the 
 166   
      *        container JVM
 167   
      */
 168   
     void setSystemProperties(Variable[] theProperties);
 169   
 
 170   
     /**
 171   
      * Subclasses must implement this method to perform the actual task of 
 172   
      * starting up the container.
 173   
      */
 174   
     void startUp();
 175   
 
 176   
     /**
 177   
      * Subclasses must implement this method to perform the actual task of 
 178   
      * shutting down the container.
 179   
      */
 180   
     void shutDown();
 181   
 
 182   
 }
 183