2009/05/20 - Apache Shale has been retired.
For more information, please explore the Attic.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.shale.view;
19
20 import javax.servlet.http.HttpSessionAttributeListener;
21 import javax.servlet.http.HttpSessionBindingEvent;
22
23 /***
24 *
25 * @author craigmcc
26 */
27 public class SessionAttributeListener implements HttpSessionAttributeListener {
28
29
30
31
32
33 public void attributeAdded(HttpSessionBindingEvent event) {
34 record("attributeAdded(" + event.getName() + "," + event.getValue() + ")");
35 }
36
37
38 public void attributeRemoved(HttpSessionBindingEvent event) {
39 record("attributeRemoved(" + event.getName() + "," + event.getValue() + ")");
40 }
41
42
43 public void attributeReplaced(HttpSessionBindingEvent event) {
44 record("attributeReplaced(" + event.getName() + "," + event.getValue() + ")");
45 }
46
47
48
49
50
51 private static String record = "";
52
53
54 public static void clear() {
55 record = "";
56 }
57
58
59 public static String record() {
60 return record;
61 }
62
63
64 private static void record(String message) {
65 record += message + "//";
66 }
67
68 }