01: //========================================================================
02: //$Id: Configuration.java,v 1.2 2005/10/26 20:48:48 gregwilkins Exp $
03: //Copyright 2004-2005 Mort Bay Consulting Pty. Ltd.
04: //------------------------------------------------------------------------
05: //Licensed under the Apache License, Version 2.0 (the "License");
06: //you may not use this file except in compliance with the License.
07: //You may obtain a copy of the License at
08: //http://www.apache.org/licenses/LICENSE-2.0
09: //Unless required by applicable law or agreed to in writing, software
10: //distributed under the License is distributed on an "AS IS" BASIS,
11: //WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12: //See the License for the specific language governing permissions and
13: //limitations under the License.
14: //========================================================================
15:
16: package org.mortbay.jetty.webapp;
17:
18: import java.io.Serializable;
19:
20: /* ------------------------------------------------------------------------------- */
21: /** Base Class for WebApplicationContext Configuration.
22: * This class can be extended to customize or extend the configuration
23: * of the WebApplicationContext. If WebApplicationContext.setConfiguration is not
24: * called, then an XMLConfiguration instance is created.
25: *
26: * @author gregw
27: */
28: public interface Configuration extends Serializable {
29: /* ------------------------------------------------------------------------------- */
30: /** Set up a context on which to perform the configuration.
31: * @param context
32: */
33: public void setWebAppContext(WebAppContext context);
34:
35: /* ------------------------------------------------------------------------------- */
36: /** Get the context on which the configuration is performed.
37: */
38: public WebAppContext getWebAppContext();
39:
40: /* ------------------------------------------------------------------------------- */
41: /** Configure ClassPath.
42: * This method is called to configure the context ClassLoader. It is called just
43: * after a new WebAppClassLoader is constructed and before it has been used.
44: * Class paths may be added, options changed or the loader totally replaced.
45: * @throws Exception
46: */
47: public void configureClassLoader() throws Exception;
48:
49: /* ------------------------------------------------------------------------------- */
50: /** Configure Defaults.
51: * This method is called to intialize the context to the containers default configuration.
52: * Typically this would mean application of the webdefault.xml file.
53: * @throws Exception
54: */
55: public void configureDefaults() throws Exception;
56:
57: /* ------------------------------------------------------------------------------- */
58: /** Configure WebApp.
59: * This method is called to apply the standard and vendor deployment descriptors.
60: * Typically this is web.xml and jetty-web.xml.
61: * @throws Exception
62: */
63: public void configureWebApp() throws Exception;
64:
65: /* ------------------------------------------------------------------------------- */
66: /** DeConfigure WebApp.
67: * This method is called to undo all configuration done to this webapphandler. This is
68: * called to allow the context to work correctly over a stop/start cycle
69: * @throws Exception
70: */
71: public void deconfigureWebApp() throws Exception;
72:
73: }
|