KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > components > persistence > RequestDataStore


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.persistence;
17
18
19 /**
20  * A request data store is a component that manages data that is
21  * linked to the current request.
22  * With the setRequestData() method you can link any object to the
23  * current request. This object can be fetched via getRequestData()
24  * as long as the request is running. This data is not available
25  * in any sub-request (cocoon: protocol calls).
26  * If you want to share data between the main request and any sub-request
27  * than you have to use the setGlobalRequestData etc. methods.
28  *
29  * This component is a replacement for the request lifecycle and
30  * global request lifecycle components.
31  *
32  * @author <a HREF="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
33  *
34  * @version CVS $Id: RequestDataStore.java 30932 2004-07-29 17:35:38Z vgritsenko $
35  * @since 2.1.1
36  */

37 public interface RequestDataStore {
38         
39     String JavaDoc ROLE = RequestDataStore.class.getName();
40     
41     Object JavaDoc getRequestData(String JavaDoc key);
42
43     void removeRequestData(String JavaDoc key);
44
45     void setRequestData(String JavaDoc key, Object JavaDoc value);
46
47     Object JavaDoc getGlobalRequestData(String JavaDoc key);
48
49     void removeGlobalRequestData(String JavaDoc key);
50
51     void setGlobalRequestData(String JavaDoc key, Object JavaDoc value);
52 }
53
Popular Tags