001    /*******************************************************************************
002     * Copyright (C) PicoContainer Organization. All rights reserved.
003     * --------------------------------------------------------------------------
004     * The software in this package is published under the terms of the BSD style
005     * license a copy of which has been included with this distribution in the
006     * LICENSE.txt file.
007     ******************************************************************************/
008    package org.picocontainer.web;
009    
010    import org.picocontainer.MutablePicoContainer;
011    
012    import javax.servlet.ServletContext;
013    
014    /**
015     * Allows to compose containers for different webapp scopes. The composer is
016     * used by the
017     * {@link org.picocontainer.web.PicoServletContainerListener PicoServletContainerListener}
018     * after the webapp context is initialised. Users can either implement their
019     * composer and register components for each scope directly or load them from a
020     * picocontainer script, using the
021     * {@link org.picocontainer.web.script.ScriptedWebappComposer ScriptedWebappComposer}.
022     * 
023     * @author Paul Hammant
024     * @author Mauro Talevi
025     */
026    public interface WebappComposer {
027    
028        void composeApplication(MutablePicoContainer applicationContainer, ServletContext servletContext);
029    
030        void composeSession(MutablePicoContainer sessionContainer);
031    
032        void composeRequest(MutablePicoContainer requestContainer);
033    
034    }