01: /*
02: * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn 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: StartSessionErrorException.java 3634 2007-01-08 21:42:24Z gbevin $
07: */
08: package com.uwyn.rife.authentication.sessionmanagers.exceptions;
09:
10: import com.uwyn.rife.authentication.exceptions.SessionManagerException;
11: import com.uwyn.rife.database.exceptions.DatabaseException;
12:
13: public class StartSessionErrorException extends SessionManagerException {
14: private static final long serialVersionUID = 1599170266402021852L;
15:
16: private long mUserId = -1;
17: private String mHostIp = null;
18:
19: public StartSessionErrorException(long userId, String hostIp) {
20: this (userId, hostIp, null);
21: }
22:
23: public StartSessionErrorException(long userId, String hostIp,
24: DatabaseException cause) {
25: super ("Unable to start session for userid '" + userId
26: + "' and hostip '" + hostIp + "'.", cause);
27: mUserId = userId;
28: mHostIp = hostIp;
29: }
30:
31: public long getUserId() {
32: return mUserId;
33: }
34:
35: public String getHostIp() {
36: return mHostIp;
37: }
38: }
|