KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mortbay > jetty > servlet > HashSessionManager


1 // ========================================================================
2
// $Id: HashSessionManager.java,v 1.16 2004/05/09 20:32:27 gregwilkins Exp $
3
// Copyright 1996-2004 Mort Bay Consulting Pty. Ltd.
4
// ------------------------------------------------------------------------
5
// Licensed under the Apache License, Version 2.0 (the "License");
6
// you may not use this file except in compliance with the License.
7
// You may obtain a copy of the License at
8
// http://www.apache.org/licenses/LICENSE-2.0
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
// ========================================================================
15

16 package org.mortbay.jetty.servlet;
17
18 import java.util.HashMap JavaDoc;
19 import java.util.Map JavaDoc;
20 import java.util.Random JavaDoc;
21
22 import javax.servlet.http.HttpServletRequest JavaDoc;
23
24
25 /* ------------------------------------------------------------ */
26 /** An in-memory implementation of SessionManager.
27  *
28  * @version $Id: HashSessionManager.java,v 1.16 2004/05/09 20:32:27 gregwilkins Exp $
29  * @author Greg Wilkins (gregw)
30  */

31 public class HashSessionManager extends AbstractSessionManager
32 {
33     /* ------------------------------------------------------------ */
34     public HashSessionManager()
35     {
36         super();
37     }
38     
39     /* ------------------------------------------------------------ */
40     public HashSessionManager(Random JavaDoc random)
41     {
42         super(random);
43     }
44
45     /* ------------------------------------------------------------ */
46     protected AbstractSessionManager.Session newSession(HttpServletRequest JavaDoc request)
47     {
48         return new Session(request);
49     }
50     
51     /* ------------------------------------------------------------ */
52     /* ------------------------------------------------------------ */
53     /* ------------------------------------------------------------ */
54     protected class Session extends AbstractSessionManager.Session
55     {
56         /* ------------------------------------------------------------- */
57         protected Session(HttpServletRequest JavaDoc request)
58         {
59             super(request);
60         }
61         
62         /* ------------------------------------------------------------ */
63         protected Map JavaDoc newAttributeMap()
64         {
65             return new HashMap JavaDoc(3);
66         }
67     }
68     
69 }
70
Popular Tags