View Javadoc

1   /*
2    * Copyright 2000-2002,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  
17  // package
18  package org.apache.jetspeed.services.statemanager;
19  
20  /***
21  * <p>SessionState is an interface for objects that provide name - value information sets
22  * with a unique key that can be used in the StateManager service</p>
23  * <p>See the proposal: jakarta-jetspeed/proposals/StateManager.txt for more details.</p>
24  * @version $Revision: 1.5 $
25  * @see org.apache.jetspeed.services.statemanager.StateManagerService
26  * @author <a href="mailto:ggolden@apache.org">Glenn R. Golden</a>
27  */
28  public interface SessionState
29  {
30      /***
31      * Access the named attribute.
32      * @param name The attribute name.
33      * @return The named attribute value.
34      */
35      public Object getAttribute( String name );
36  
37      /***
38      * Set the named attribute value to the provided object.
39      * @param name The attribute name.
40      * @param value The value of the attribute (any object type).
41      */
42      public void setAttribute( String name, Object value );
43  
44      /***
45      * Remove the named attribute, if it exists.
46      * @param name The attribute name.
47      */
48      public void removeAttribute( String name );
49  
50      /***
51      * Remove all attributes.
52      */
53      public void clear();
54  
55      /***
56      * Access an array of all names of attributes stored in the SessionState.
57      * @return An array of all names of attribute stored in the SessionState.
58      */
59      public String[] getAttributeNames();
60  
61      /***
62      * Access the unique StateManager key for the SessionState.
63      * @return the unique StateManager key for the SessionState.
64      */
65      public String getKey();
66  
67      /***
68      * Retire, forget about and clean up this state.
69      */
70      public void retire();
71  
72  }   // interface SessionState
73  
74  /***********************************************************************************
75  *
76  * $Header: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/statemanager/SessionState.java,v 1.5 2004/02/23 03:38:28 jford Exp $
77  *
78  **********************************************************************************/
79