01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package javax.servlet.http;
05:
06: public class MockSessionBindingListener implements
07: HttpSessionBindingListener {
08:
09: private String lastEventName = null;
10: private HttpSessionBindingEvent lastEvent;
11:
12: public HttpSessionBindingEvent getLastEvent() {
13: return lastEvent;
14: }
15:
16: public String getLastEventName() {
17: return lastEventName;
18: }
19:
20: public void valueBound(HttpSessionBindingEvent arg0) {
21: lastEventName = "valueBound";
22: this .lastEvent = arg0;
23: }
24:
25: public void valueUnbound(HttpSessionBindingEvent arg0) {
26: lastEventName = "valueUnbound";
27: this .lastEvent = arg0;
28: }
29:
30: public void clear() {
31: this.lastEvent = null;
32: this.lastEventName = null;
33: }
34:
35: }
|