Class 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
    • Constructor Detail

      • ConnectionHandlersMonitoringTableModel

        public ConnectionHandlersMonitoringTableModel()
    • 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 null if 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:
        forceResort in class SortableTableModel
      • 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.
      • isSortAscending

        public boolean isSortAscending()
        Returns whether the sort is ascending or descending.
        Specified by:
        isSortAscending in class SortableTableModel
        Returns:
        true if the sort is ascending and false otherwise.
      • setSortAscending

        public void setSortAscending​(boolean sortAscending)
        Sets whether to sort ascending of descending.
        Specified by:
        setSortAscending in class SortableTableModel
        Parameters:
        sortAscending - whether to sort ascending or descending.
      • getSortColumn

        public int getSortColumn()
        Returns the column index used to sort.
        Specified by:
        getSortColumn in class SortableTableModel
        Returns:
        the column index used to sort.
      • setSortColumn

        public void setSortColumn​(int sortColumn)
        Sets the column index used to sort.
        Specified by:
        setSortColumn in class SortableTableModel
        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.