01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * 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: package org.apache.catalina;
19:
20: /**
21: * An <b>Engine</b> is a Container that represents the entire Catalina servlet
22: * engine. It is useful in the following types of scenarios:
23: * <ul>
24: * <li>You wish to use Interceptors that see every single request processed
25: * by the entire engine.
26: * <li>You wish to run Catalina in with a standalone HTTP connector, but still
27: * want support for multiple virtual hosts.
28: * </ul>
29: * In general, you would not use an Engine when deploying Catalina connected
30: * to a web server (such as Apache), because the Connector will have
31: * utilized the web server's facilities to determine which Context (or
32: * perhaps even which Wrapper) should be utilized to process this request.
33: * <p>
34: * The child containers attached to an Engine are generally implementations
35: * of Host (representing a virtual host) or Context (representing individual
36: * an individual servlet context), depending upon the Engine implementation.
37: * <p>
38: * If used, an Engine is always the top level Container in a Catalina
39: * hierarchy. Therefore, the implementation's <code>setParent()</code> method
40: * should throw <code>IllegalArgumentException</code>.
41: *
42: * @author Craig R. McClanahan
43: * @version $Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $
44: */
45:
46: public interface Engine extends Container {
47:
48: // ------------------------------------------------------------- Properties
49:
50: /**
51: * Return the default hostname for this Engine.
52: */
53: public String getDefaultHost();
54:
55: /**
56: * Set the default hostname for this Engine.
57: *
58: * @param defaultHost The new default host
59: */
60: public void setDefaultHost(String defaultHost);
61:
62: /**
63: * Retrieve the JvmRouteId for this engine.
64: */
65: public String getJvmRoute();
66:
67: /**
68: * Set the JvmRouteId for this engine.
69: *
70: * @param jvmRouteId the (new) JVM Route ID. Each Engine within a cluster
71: * must have a unique JVM Route ID.
72: */
73: public void setJvmRoute(String jvmRouteId);
74:
75: /**
76: * Return the <code>Service</code> with which we are associated (if any).
77: */
78: public Service getService();
79:
80: /**
81: * Set the <code>Service</code> with which we are associated (if any).
82: *
83: * @param service The service that owns this Engine
84: */
85: public void setService(Service service);
86:
87: }
|