01: /*
02: * Copyright 2001-2007 Steven Grimm <koreth[remove] at midwinter dot com>
03: * Distributed under the terms of either:
04: * - the common development and distribution license (CDDL), v1.0; or
05: * - the GNU Lesser General Public License, v2.1 or later
06: * $Id$
07: */
08: package com.uwyn.rife.authentication.sessionmanagers;
09:
10: import com.uwyn.rife.authentication.ListSessions;
11: import com.uwyn.rife.authentication.SessionManager;
12:
13: /**
14: * Dummy session manager class; this is just a mock we can use to test
15: * that our session factory is being used.
16: */
17: public class CustomSessionManager implements SessionManager {
18: private String mId;
19:
20: public CustomSessionManager() {
21: }
22:
23: public CustomSessionManager(String id) {
24: mId = id;
25: }
26:
27: public String getId() {
28: return mId;
29: }
30:
31: public boolean continueSession(String authId) {
32: return false;
33: }
34:
35: public long countSessions() {
36: return 0;
37: }
38:
39: public void eraseAllSessions() {
40: }
41:
42: public boolean eraseSession(String authId) {
43: return false;
44: }
45:
46: public boolean eraseUserSessions(long userId) {
47: return false;
48: }
49:
50: public boolean getRestrictHostIp() {
51: return false;
52: }
53:
54: public long getSessionDuration() {
55: return 0;
56: }
57:
58: public long getSessionUserId(String authId) {
59: return 0;
60: }
61:
62: public boolean isSessionValid(String authId, String hostIp) {
63: return false;
64: }
65:
66: public boolean listSessions(ListSessions processor) {
67: return false;
68: }
69:
70: public void purgeSessions() {
71: }
72:
73: public void setRestrictHostIp(boolean flag) {
74: }
75:
76: public void setSessionDuration(long milliseconds) {
77: }
78:
79: public String startSession(long userId, String hostIp,
80: boolean remembered) {
81: return null;
82: }
83:
84: public boolean wasRemembered(String authId) {
85: return false;
86: }
87: }
|