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 com.tc.admin.sessions;
05:
06: import com.tc.management.beans.sessions.SessionMonitorMBean;
07:
08: public class SessionMonitorWrapper {
09: 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
25: .getSessionCreationRatePerMinute();
26: destroyedSessionCount = bean.getDestroyedSessionCount();
27: sessionDestructionRatePerMinute = bean
28: .getSessionDestructionRatePerMinute();
29: }
30:
31: public int getRequestCount() {
32: return requestCount;
33: }
34:
35: public int getRequestRatePerSecond() {
36: return requestRatePerSecond;
37: }
38:
39: public int getCreatedSessionCount() {
40: return createdSessionCount;
41: }
42:
43: public int getSessionCreationRatePerMinute() {
44: return sessionCreationRatePerMinute;
45: }
46:
47: public int getDestroyedSessionCount() {
48: return destroyedSessionCount;
49: }
50:
51: public int getSessionDestructionRatePerMinute() {
52: return sessionDestructionRatePerMinute;
53: }
54:
55: public boolean expireSession(String sessionId) {
56: return bean.expireSession(sessionId);
57: }
58: }
|