Added in a default constructor to use the original sessionid and a constructor for specifying the sessionId

This commit is contained in:
Ray Krueger 2005-02-25 05:24:10 +00:00
parent 693ac5a24a
commit 4125db5650
1 changed files with 19 additions and 5 deletions

View File

@ -15,13 +15,12 @@
package net.sf.acegisecurity;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionContext;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
/**
@ -35,6 +34,21 @@ public class MockHttpSession implements HttpSession {
//~ Instance fields ========================================================
private Map map = new HashMap();
private String sessionId = "3984594856968";
/**
* Default constructor using default sessionId
*/
public MockHttpSession() {
}
/**
* Constructor for using a specified sessionId
* @param sessionId
*/
public MockHttpSession(String sessionId) {
this.sessionId = sessionId;
}
//~ Methods ================================================================
@ -55,7 +69,7 @@ public class MockHttpSession implements HttpSession {
}
public String getId() {
return "3984594856968";
return sessionId;
}
public long getLastAccessedTime() {