KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > lutris > appserver > server > sessionEnhydra > persistent > PersistentSessionData


1
2 /*
3  * Enhydra Java Application Server Project
4  *
5  * The contents of this file are subject to the Enhydra Public License
6  * Version 1.1 (the "License"); you may not use this file except in
7  * compliance with the License. You may obtain a copy of the License on
8  * the Enhydra web site ( http://www.enhydra.org/ ).
9  *
10  * Software distributed under the License is distributed on an "AS IS"
11  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
12  * the License for the specific terms governing rights and limitations
13  * under the License.
14  *
15  * The Initial Developer of the Enhydra Application Server is Lutris
16  * Technologies, Inc. The Enhydra Application Server and portions created
17  * by Lutris Technologies, Inc. are Copyright Lutris Technologies, Inc.
18  * All Rights Reserved.
19  *
20  * Contributor(s):
21  *
22  * $Id: PersistentSessionData.java,v 1.2 2005/03/24 10:51:20 slobodan Exp $
23  */

24
25 package com.lutris.appserver.server.sessionEnhydra.persistent;
26
27 import java.io.Serializable JavaDoc;
28
29 import com.lutris.appserver.server.sessionEnhydra.PagedSessionData;
30 import com.lutris.util.KeywordValueException;
31
32 /**
33  * Session data used to store dynamic application
34  * objects. All objects stored in this object must be
35  * serializable.
36  *
37  * @version $Revision: 1.2 $
38  * @author Kyle Clark
39  */

40 public class PersistentSessionData extends PagedSessionData {
41
42     /**
43      * This method enforces that all PersistentSessionData be
44      * serializable.
45      *
46      * @param keyword The keyword of the field. This can be a simple keyword
47      * or a recursive, dot-seperated keyword path.
48      * @param value The value to associate with the keyword. The value may
49      * not be null and it must be serializable.
50      * @exception KeywordValueException If the keyword is not syntactically
51      * legal or if the value is not serializable.
52      */

53     public synchronized void set(String JavaDoc keyword, Object JavaDoc value)
54         throws KeywordValueException {
55         if (!(value instanceof Serializable JavaDoc)) {
56             throw new KeywordValueException("Value must be serializable.");
57         }
58         super.set(keyword, value);
59     }
60
61 }
62
63
Popular Tags