01: package org.mortbay.jetty;
02:
03: import javax.servlet.http.HttpServletRequest;
04: import javax.servlet.http.HttpSession;
05:
06: import org.mortbay.component.LifeCycle;
07:
08: /** Session ID Manager.
09: * Manages session IDs across multiple contexts.
10: * @author gregw
11: *
12: */
13: public interface SessionIdManager extends LifeCycle {
14: /**
15: * @param id
16: * @return True if the session ID is in use by at least one context.
17: */
18: public boolean idInUse(String id);
19:
20: /**
21: * Add a session to the list of known sessions for a given ID.
22: * @param session The session
23: */
24: public void addSession(HttpSession session);
25:
26: /**
27: * Remove session from the list of known sessions for a given ID.
28: * @param session
29: */
30: public void removeSession(HttpSession session);
31:
32: /**
33: * Call {@link HttpSession#invalidate()} on all known sessions for the given id.
34: * @param id
35: */
36: public void invalidateAll(String id);
37:
38: /**
39: * @param request
40: * @param created
41: * @return
42: */
43: public String newSessionId(HttpServletRequest request, long created);
44:
45: public String getWorkerName();
46: }
|