KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > components > RequestLifecycleComponent


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

16 package org.apache.cocoon.components;
17
18 import java.io.IOException JavaDoc;
19 import java.util.Map JavaDoc;
20
21 import org.apache.avalon.excalibur.pool.Poolable;
22 import org.apache.cocoon.ProcessingException;
23 import org.apache.cocoon.environment.SourceResolver;
24 import org.xml.sax.SAXException JavaDoc;
25
26 /**
27  * Components implementing this marker interface have a lifecycle of one
28  * request. This means if during one request a component accepting this
29  * interface is looked up several times, it's always the same instance.
30  * Each internal subrequest, e.g. using the cocoon protocol, is considered
31  * as a new request. So an instance looked up in the "main" request is
32  * not available to a subrequest.
33  * In addition, the first time this component is looked up during a request,
34  * the {@link #setup(SourceResolver, Map)} method is called.
35  *
36  * @see org.apache.cocoon.components.GlobalRequestLifecycleComponent
37  * @deprecated Use the {@link org.apache.cocoon.components.persistence.RequestDataStore} instead.
38  *
39  * @author <a HREF="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
40  * @version CVS $Id: RequestLifecycleComponent.java 30932 2004-07-29 17:35:38Z vgritsenko $
41  */

42 public interface RequestLifecycleComponent extends Poolable {
43
44     /**
45      * Set the {@link SourceResolver} and the objectModel
46      * used to process the current request.
47      */

48     void setup(SourceResolver resolver, Map JavaDoc objectModel)
49     throws ProcessingException, SAXException JavaDoc, IOException JavaDoc;
50 }
51
Popular Tags