01: /*
02: * Enhydra Java Application Server Project
03: *
04: * The contents of this file are subject to the Enhydra Public License
05: * Version 1.1 (the "License"); you may not use this file except in
06: * compliance with the License. You may obtain a copy of the License on
07: * the Enhydra web site ( http://www.enhydra.org/ ).
08: *
09: * Software distributed under the License is distributed on an "AS IS"
10: * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
11: * the License for the specific terms governing rights and limitations
12: * under the License.
13: *
14: * The Initial Developer of the Enhydra Application Server is Lutris
15: * Technologies, Inc. The Enhydra Application Server and portions created
16: * by Lutris Technologies, Inc. are Copyright Lutris Technologies, Inc.
17: * All Rights Reserved.
18: *
19: * Contributor(s):
20: *
21: * $Id: PagedSessionData.java,v 1.2 2006-06-15 13:44:07 sinisa Exp $
22: */
23:
24: package com.lutris.appserver.server.sessionEnhydra;
25:
26: import java.io.Serializable;
27:
28: import com.lutris.appserver.server.session.SessionData;
29: import com.lutris.util.KeywordValueException;
30:
31: /**
32: * Session data used to store dynamic application
33: * objects. All objects stored in this object must be
34: * serializable.
35: *
36: * @version $Revision: 1.2 $
37: * @author Kyle Clark
38: */
39: public class PagedSessionData extends SessionData {
40:
41: /**
42: * This method enforces that all PagedSessionData be
43: * serializable.
44: *
45: * @param keyword The keyword of the field. This can be a simple keyword
46: * or a recursive, dot-seperated keyword path.
47: * @param value The value to associate with the keyword. The value may
48: * not be null and it must be serializable.
49: * @exception KeywordValueException If the keyword is not syntactically
50: * legal or if the value is not serializable.
51: */
52: public synchronized void set(String keyword, Object value)
53: throws KeywordValueException {
54: if (!(value instanceof Serializable)) {
55: throw new KeywordValueException(
56: "Value must be serializable.");
57: }
58: super.set(keyword, value);
59: }
60:
61: }
|