KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > servlet > http > MockSessionBindingListener


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package javax.servlet.http;
5
6 public class MockSessionBindingListener implements HttpSessionBindingListener JavaDoc {
7
8   private String JavaDoc lastEventName = null;
9   private HttpSessionBindingEvent JavaDoc lastEvent;
10
11   public HttpSessionBindingEvent JavaDoc getLastEvent() {
12     return lastEvent;
13   }
14
15   public String JavaDoc getLastEventName() {
16     return lastEventName;
17   }
18
19   public void valueBound(HttpSessionBindingEvent JavaDoc arg0) {
20     lastEventName = "valueBound";
21     this.lastEvent = arg0;
22   }
23
24   public void valueUnbound(HttpSessionBindingEvent JavaDoc arg0) {
25     lastEventName = "valueUnbound";
26     this.lastEvent = arg0;
27   }
28   
29   public void clear() {
30     this.lastEvent = null;
31     this.lastEventName = null;
32   }
33
34 }
35
Popular Tags