KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > terracotta > session > util > MockIdGenerator


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.terracotta.session.util;
5
6 import com.terracotta.session.SessionId;
7
8 public class MockIdGenerator implements SessionIdGenerator {
9
10   private SessionId id;
11
12   public MockIdGenerator(SessionId id) {
13     this.id = id;
14   }
15
16   public SessionId generateNewId() {
17     return id;
18   }
19
20   public SessionId makeInstanceFromBrowserId(String JavaDoc requestedSessionId) {
21     return id;
22   }
23
24   public SessionId makeInstanceFromInternalKey(String JavaDoc key) {
25     return id;
26   }
27
28 }
29
Popular Tags