1 4 package com.tc.admin.sessions; 5 6 import com.tc.admin.common.PropertyTable; 7 import com.tc.admin.common.PropertyTableModel; 8 import com.tc.management.beans.sessions.SessionMonitorMBean; 9 10 public class SessionMonitorTable extends PropertyTable { 11 private SessionMonitorMBean m_bean; 12 13 public SessionMonitorTable() { 14 super(); 15 } 16 17 void setBean(SessionMonitorMBean bean) { 18 if(bean == null) { 19 return; 20 } 21 22 String [] fields = { 23 "RequestCount", 24 "RequestRatePerSecond", 25 "CreatedSessionCount", 26 "SessionCreationRatePerMinute", 27 "DestroyedSessionCount", 28 "SessionDestructionRatePerMinute" 29 }; 30 SessionMonitorWrapper wrapper = new SessionMonitorWrapper(m_bean = bean); 31 PropertyTableModel model = new PropertyTableModel(wrapper, fields); 32 setModel(model); 33 } 34 35 public void refresh() { 36 PropertyTableModel model = (PropertyTableModel)getModel(); 37 model.setInstance(new SessionMonitorWrapper(m_bean)); 38 } 39 } 40 | Popular Tags |