Class ConnectionHandlersMonitoringTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- org.opends.guitools.controlpanel.datamodel.SortableTableModel
-
- org.opends.guitools.controlpanel.datamodel.ConnectionHandlersMonitoringTableModel
-
- All Implemented Interfaces:
Serializable,Comparator<org.opends.guitools.controlpanel.datamodel.AddressConnectionHandlerDescriptor>,TableModel
public class ConnectionHandlersMonitoringTableModel extends SortableTableModel
The table model used to display the monitoring information of connection handlers.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
-
-
Constructor Summary
Constructors Constructor Description ConnectionHandlersMonitoringTableModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(org.opends.guitools.controlpanel.datamodel.AddressConnectionHandlerDescriptor desc1, org.opends.guitools.controlpanel.datamodel.AddressConnectionHandlerDescriptor desc2)protected Set<org.opends.guitools.controlpanel.datamodel.AddressConnectionHandlerDescriptor>convertToInternalData(Set<ConnectionHandlerDescriptor> newData)Converts the provided data into internal data to be used by the table model.voidforceDataStructureChange()Updates the table model contents, sorts its contents depending on the sort options set by the user and updates the column structure.voidforceResort()Updates the table model contents and sorts its contents depending on the sort options set by the user.Collection<MonitoringAttributes>getAttributes()Returns the attributes displayed by this table model.intgetColumnCount()StringgetColumnName(int col)protected SearchResultEntrygetMonitoringEntry(org.opends.guitools.controlpanel.datamodel.AddressConnectionHandlerDescriptor ach)Returns the monitoring entry associated with the provided object.protected List<Integer>getMonitoringPossibleResults(SearchResultEntry monitor1, SearchResultEntry monitor2)Returns a list of integer with all the values of two monitoring entries compared.protected StringgetName(org.opends.guitools.controlpanel.datamodel.AddressConnectionHandlerDescriptor ach)Returns the label to be used for the provided internal object.protected org.forgerock.i18n.LocalizableMessagegetNameHeader()Returns the header to be used for the name of the object.intgetRowCount()intgetSortColumn()Returns the column index used to sort.ObjectgetValueAt(int row, int col)booleanisSortAscending()Returns whether the sort is ascending or descending.voidsetAttributes(LinkedHashSet<MonitoringAttributes> attributes, boolean showAverages)Sets the operations displayed by this table model.voidsetData(Set<T> newData, long runningTime)Sets the data for this table model.voidsetSortAscending(boolean sortAscending)Sets whether to sort ascending of descending.voidsetSortColumn(int sortColumn)Sets the column index used to sort.-
Methods inherited from class org.opends.guitools.controlpanel.datamodel.SortableTableModel
getHeader, getHeader
-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Method Detail
-
convertToInternalData
protected Set<org.opends.guitools.controlpanel.datamodel.AddressConnectionHandlerDescriptor> convertToInternalData(Set<ConnectionHandlerDescriptor> newData)
Converts the provided data into internal data to be used by the table model.- Parameters:
newData- the set of objects to convert.- Returns:
- the set of objects to be used by the table model.
-
compare
public int compare(org.opends.guitools.controlpanel.datamodel.AddressConnectionHandlerDescriptor desc1, org.opends.guitools.controlpanel.datamodel.AddressConnectionHandlerDescriptor desc2)
-
getMonitoringEntry
protected SearchResultEntry getMonitoringEntry(org.opends.guitools.controlpanel.datamodel.AddressConnectionHandlerDescriptor ach)
Returns the monitoring entry associated with the provided object.- Parameters:
ach- the internal object.- Returns:
- the monitoring entry associated with the provided object. Returns
nullif there is no monitoring entry associated.
-
getName
protected String getName(org.opends.guitools.controlpanel.datamodel.AddressConnectionHandlerDescriptor ach)
Returns the label to be used for the provided internal object.- Parameters:
ach- the internal object.- Returns:
- the label to be used for the provided internal object.
-
getNameHeader
protected org.forgerock.i18n.LocalizableMessage getNameHeader()
Returns the header to be used for the name of the object.- Returns:
- the header to be used for the name of the object.
-
setData
public void setData(Set<T> newData, long runningTime)
Sets the data for this table model.- Parameters:
newData- the data for this table model.runningTime- the running time of the server in miliseconds.
-
forceResort
public void forceResort()
Updates the table model contents and sorts its contents depending on the sort options set by the user.- Specified by:
forceResortin classSortableTableModel
-
forceDataStructureChange
public void forceDataStructureChange()
Updates the table model contents, sorts its contents depending on the sort options set by the user and updates the column structure.
-
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCountin interfaceTableModel
-
getRowCount
public int getRowCount()
- Specified by:
getRowCountin interfaceTableModel
-
getValueAt
public Object getValueAt(int row, int col)
- Specified by:
getValueAtin interfaceTableModel
-
getColumnName
public String getColumnName(int col)
- Specified by:
getColumnNamein interfaceTableModel- Overrides:
getColumnNamein classAbstractTableModel
-
isSortAscending
public boolean isSortAscending()
Returns whether the sort is ascending or descending.- Specified by:
isSortAscendingin classSortableTableModel- Returns:
trueif the sort is ascending andfalseotherwise.
-
setSortAscending
public void setSortAscending(boolean sortAscending)
Sets whether to sort ascending of descending.- Specified by:
setSortAscendingin classSortableTableModel- Parameters:
sortAscending- whether to sort ascending or descending.
-
getSortColumn
public int getSortColumn()
Returns the column index used to sort.- Specified by:
getSortColumnin classSortableTableModel- Returns:
- the column index used to sort.
-
setSortColumn
public void setSortColumn(int sortColumn)
Sets the column index used to sort.- Specified by:
setSortColumnin classSortableTableModel- Parameters:
sortColumn- column index used to sort..
-
getAttributes
public Collection<MonitoringAttributes> getAttributes()
Returns the attributes displayed by this table model.- Returns:
- the attributes displayed by this table model.
-
setAttributes
public void setAttributes(LinkedHashSet<MonitoringAttributes> attributes, boolean showAverages)
Sets the operations displayed by this table model.- Parameters:
attributes- the attributes displayed by this table model.showAverages- whether the averages (when makes sense) should be displayed or not.
-
getMonitoringPossibleResults
protected List<Integer> getMonitoringPossibleResults(SearchResultEntry monitor1, SearchResultEntry monitor2)
Returns a list of integer with all the values of two monitoring entries compared.- Parameters:
monitor1- the first monitoring entry.monitor2- the second monitoring entry.- Returns:
- a list of integer with all the values of two monitoring entries compared.
-
-