Save This Page
Home » glassfish-v2ur2-b04-src » org.apache » catalina » [javadoc | source]
    1   
    2   
    3   /*
    4    * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    5    * 
    6    * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    7    * 
    8    * Portions Copyright Apache Software Foundation.
    9    * 
   10    * The contents of this file are subject to the terms of either the GNU
   11    * General Public License Version 2 only ("GPL") or the Common Development
   12    * and Distribution License("CDDL") (collectively, the "License").  You
   13    * may not use this file except in compliance with the License. You can obtain
   14    * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
   15    * or glassfish/bootstrap/legal/LICENSE.txt.  See the License for the specific
   16    * language governing permissions and limitations under the License.
   17    * 
   18    * When distributing the software, include this License Header Notice in each
   19    * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
   20    * Sun designates this particular file as subject to the "Classpath" exception
   21    * as provided by Sun in the GPL Version 2 section of the License file that
   22    * accompanied this code.  If applicable, add the following below the License
   23    * Header, with the fields enclosed by brackets [] replaced by your own
   24    * identifying information: "Portions Copyrighted [year]
   25    * [name of copyright owner]"
   26    * 
   27    * Contributor(s):
   28    * 
   29    * If you wish your version of this file to be governed by only the CDDL or
   30    * only the GPL Version 2, indicate your decision by adding "[Contributor]
   31    * elects to include this software in this distribution under the [CDDL or GPL
   32    * Version 2] license."  If you don't indicate a single choice of license, a
   33    * recipient has the option to distribute your version of this file under
   34    * either the CDDL, the GPL Version 2 or to extend the choice of license to
   35    * its licensees as provided above.  However, if you add GPL Version 2 code
   36    * and therefore, elected the GPL Version 2 license, then the option applies
   37    * only if the new code is made subject to such option by the copyright
   38    * holder.
   39    */
   40   
   41   
   42   package org.apache.catalina;
   43   
   44   /**
   45    * An <b>Engine</b> is a Container that represents the entire Catalina servlet
   46    * engine.  It is useful in the following types of scenarios:
   47    * <ul>
   48    * <li>You wish to use Interceptors that see every single request processed
   49    *     by the entire engine.
   50    * <li>You wish to run Catalina in with a standalone HTTP connector, but still
   51    *     want support for multiple virtual hosts.
   52    * </ul>
   53    * In general, you would not use an Engine when deploying Catalina connected
   54    * to a web server (such as Apache), because the Connector will have
   55    * utilized the web server's facilities to determine which Context (or
   56    * perhaps even which Wrapper) should be utilized to process this request.
   57    * <p>
   58    * The child containers attached to an Engine are generally implementations
   59    * of Host (representing a virtual host) or Context (representing individual
   60    * an individual servlet context), depending upon the Engine implementation.
   61    * <p>
   62    * If used, an Engine is always the top level Container in a Catalina
   63    * hierarchy. Therefore, the implementation's <code>setParent()</code> method
   64    * should throw <code>IllegalArgumentException</code>.
   65    *
   66    * @author Craig R. McClanahan
   67    * @version $Revision: 1.3 $ $Date: 2007/05/05 05:31:51 $
   68    */
   69   
   70   public interface Engine extends Container {
   71   
   72   
   73       // ------------------------------------------------------------- Properties
   74   
   75   
   76       /**
   77        * Return the default hostname for this Engine.
   78        */
   79       public String getDefaultHost();
   80   
   81   
   82       /**
   83        * Set the default hostname for this Engine.
   84        *
   85        * @param defaultHost The new default host
   86        */
   87       public void setDefaultHost(String defaultHost);
   88   
   89   
   90       /**
   91        * Retrieve the JvmRouteId for this engine.
   92        */
   93       public String getJvmRoute();
   94   
   95   
   96       /**
   97        * Set the JvmRouteId for this engine.
   98        *
   99        * @param jvmRouteId the (new) JVM Route ID. Each Engine within a cluster
  100        *        must have a unique JVM Route ID.
  101        */
  102       public void setJvmRoute(String jvmRouteId);
  103   
  104   
  105       /**
  106        * Return the <code>Service</code> with which we are associated (if any).
  107        */
  108       public Service getService();
  109   
  110   
  111       /**
  112        * Set the <code>Service</code> with which we are associated (if any).
  113        *
  114        * @param service The service that owns this Engine
  115        */
  116       public void setService(Service service);
  117   
  118   
  119       /**
  120        * Set the DefaultContext
  121        * for new web applications.
  122        *
  123        * @param defaultContext The new DefaultContext
  124        */
  125       public void addDefaultContext(DefaultContext defaultContext);
  126   
  127   
  128       /**
  129        * Retrieve the DefaultContext for new web applications.
  130        */
  131       public DefaultContext getDefaultContext();
  132       
  133       
  134       // --------------------------------------------------------- Public Methods
  135   
  136   
  137       /**
  138        * Import the DefaultContext config into a web application context.
  139        *
  140        * @param context web application context to import default context
  141        */
  142       public void importDefaultContext(Context context);
  143   
  144   
  145   }

Save This Page
Home » glassfish-v2ur2-b04-src » org.apache » catalina » [javadoc | source]