1 4 package com.tc.admin; 5 6 import com.tc.admin.common.XObjectTableModel; 7 8 public class ClusterMemberTableModel extends XObjectTableModel { 9 private static final String [] CLUSTER_MEMBERS_FIELDS = {"Name", "Hostname", "JMXPortNumber"}; 10 private static final String [] CLUSTER_MEMBERS_HEADERS = {"Name", "Host", "Admin Port"}; 11 12 public ClusterMemberTableModel() { 13 super(ServerConnectionManager.class, 14 CLUSTER_MEMBERS_FIELDS, 15 CLUSTER_MEMBERS_HEADERS); 16 } 17 18 public void addClusterMember(ServerConnectionManager scm) { 19 add(scm); 20 } 21 22 public ServerConnectionManager getClusterMemberAt(int row) { 23 return (ServerConnectionManager)getObjectAt(row); 24 } 25 26 public void clear() { 27 int count = getRowCount(); 28 for(int i = 0; i < count; i++) { 29 getClusterMemberAt(i).tearDown(); 30 } 31 super.clear(); 32 } 33 34 public void tearDown() { 35 clear(); 36 } 37 } 38 39 | Popular Tags |