KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > admin > sessions > SessionMonitorWrapper


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 com.tc.admin.sessions;
5
6 import com.tc.management.beans.sessions.SessionMonitorMBean;
7
8 public class SessionMonitorWrapper {
9   private SessionMonitorMBean bean;
10   
11   private int requestCount;
12   private int requestRatePerSecond;
13   private int createdSessionCount;
14   private int sessionCreationRatePerMinute;
15   private int destroyedSessionCount;
16   private int sessionDestructionRatePerMinute;
17   
18   public SessionMonitorWrapper(SessionMonitorMBean bean) {
19     this.bean = bean;
20     
21     requestCount = bean.getRequestCount();
22     requestRatePerSecond = bean.getRequestRatePerSecond();
23     createdSessionCount = bean.getCreatedSessionCount();
24     sessionCreationRatePerMinute = bean.getSessionCreationRatePerMinute();
25     destroyedSessionCount = bean.getDestroyedSessionCount();
26     sessionDestructionRatePerMinute = bean.getSessionDestructionRatePerMinute();
27   }
28   
29   public int getRequestCount() {
30     return requestCount;
31   }
32
33   public int getRequestRatePerSecond() {
34     return requestRatePerSecond;
35   }
36
37   public int getCreatedSessionCount() {
38     return createdSessionCount;
39   }
40
41   public int getSessionCreationRatePerMinute() {
42     return sessionCreationRatePerMinute;
43   }
44
45   public int getDestroyedSessionCount() {
46     return destroyedSessionCount;
47   }
48
49   public int getSessionDestructionRatePerMinute() {
50     return sessionDestructionRatePerMinute;
51   }
52
53   public boolean expireSession(String JavaDoc sessionId) {
54     return bean.expireSession(sessionId);
55   }
56 }
57
Popular Tags