KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > catalina > Engine


1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17
18
19 package org.apache.catalina;
20
21 /**
22  * An <b>Engine</b> is a Container that represents the entire Catalina servlet
23  * engine. It is useful in the following types of scenarios:
24  * <ul>
25  * <li>You wish to use Interceptors that see every single request processed
26  * by the entire engine.
27  * <li>You wish to run Catalina in with a standalone HTTP connector, but still
28  * want support for multiple virtual hosts.
29  * </ul>
30  * In general, you would not use an Engine when deploying Catalina connected
31  * to a web server (such as Apache), because the Connector will have
32  * utilized the web server's facilities to determine which Context (or
33  * perhaps even which Wrapper) should be utilized to process this request.
34  * <p>
35  * The child containers attached to an Engine are generally implementations
36  * of Host (representing a virtual host) or Context (representing individual
37  * an individual servlet context), depending upon the Engine implementation.
38  * <p>
39  * If used, an Engine is always the top level Container in a Catalina
40  * hierarchy. Therefore, the implementation's <code>setParent()</code> method
41  * should throw <code>IllegalArgumentException</code>.
42  *
43  * @author Craig R. McClanahan
44  * @version $Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $
45  */

46
47 public interface Engine extends Container {
48
49
50     // ------------------------------------------------------------- Properties
51

52
53     /**
54      * Return the default hostname for this Engine.
55      */

56     public String JavaDoc getDefaultHost();
57
58
59     /**
60      * Set the default hostname for this Engine.
61      *
62      * @param defaultHost The new default host
63      */

64     public void setDefaultHost(String JavaDoc defaultHost);
65
66
67     /**
68      * Retrieve the JvmRouteId for this engine.
69      */

70     public String JavaDoc getJvmRoute();
71
72
73     /**
74      * Set the JvmRouteId for this engine.
75      *
76      * @param jvmRouteId the (new) JVM Route ID. Each Engine within a cluster
77      * must have a unique JVM Route ID.
78      */

79     public void setJvmRoute(String JavaDoc jvmRouteId);
80
81
82     /**
83      * Return the <code>Service</code> with which we are associated (if any).
84      */

85     public Service getService();
86
87
88     /**
89      * Set the <code>Service</code> with which we are associated (if any).
90      *
91      * @param service The service that owns this Engine
92      */

93     public void setService(Service service);
94
95
96 }
97
Popular Tags