1 // ======================================================================== 2 // Copyright (c) 2004-2009 Mort Bay Consulting Pty. Ltd. 3 // ------------------------------------------------------------------------ 4 // All rights reserved. This program and the accompanying materials 5 // are made available under the terms of the Eclipse Public License v1.0 6 // and Apache License v2.0 which accompanies this distribution. 7 // The Eclipse Public License is available at 8 // http://www.eclipse.org/legal/epl-v10.html 9 // The Apache License v2.0 is available at 10 // http://www.opensource.org/licenses/apache2.0.php 11 // You may elect to redistribute this code under either of these licenses. 12 // ======================================================================== 13 14 package org.eclipse.jetty.webapp; 15 16 17 /* ------------------------------------------------------------------------------- */ 18 /** Base Class for WebApplicationContext Configuration. 19 * This class can be extended to customize or extend the configuration 20 * of the WebApplicationContext. 21 */ 22 public interface Configuration 23 { 24 25 /* ------------------------------------------------------------------------------- */ 26 /** Set up for configuration. 27 * @throws Exception 28 */ 29 public void preConfigure (WebAppContext context) throws Exception; 30 31 32 /* ------------------------------------------------------------------------------- */ 33 /** Configure WebApp. 34 * 35 * @throws Exception 36 */ 37 public void configure (WebAppContext context) throws Exception; 38 39 40 /* ------------------------------------------------------------------------------- */ 41 /** Clear down after configuration. 42 * @throws Exception 43 */ 44 public void postConfigure (WebAppContext context) throws Exception; 45 46 /* ------------------------------------------------------------------------------- */ 47 /** DeConfigure WebApp. 48 * This method is called to undo all configuration done. This is 49 * called to allow the context to work correctly over a stop/start cycle 50 * @throws Exception 51 */ 52 public void deconfigure (WebAppContext context) throws Exception; 53 54 55 }