1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.struts2.interceptor;
19
20 import java.util.Map;
21
22
23 /***
24 * Actions that want access to the user's HTTP session should implement this interface.<p>
25 * <p/>
26 * This interface is only relevant if the Action is used in a servlet environment.<p>
27 * <p/>
28 * Note that using this interface makes the Action tied to a servlet environment, so it should be
29 * avoided if possible since things like unit testing will become more difficult.
30 *
31 */
32 public interface SessionAware {
33
34 /***
35 * Sets the Map of session attributes in the implementing class.
36 *
37 * @param session a Map of HTTP session attribute name/value pairs.
38 */
39 public void setSession(Map session);
40 }