Class TopologyUtils

java.lang.Object
org.jppf.ui.utils.TopologyUtils

public class TopologyUtils extends Object
Utility methods for manipulating the topology tree model.
Author:
Laurent Cohen
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    addDriver(AbstractJPPFTreeTableModel model, org.jppf.client.monitoring.topology.TopologyDriver driver)
    Add the specified driver to the treeTable.
    addNode(AbstractJPPFTreeTableModel model, org.jppf.client.monitoring.topology.TopologyDriver driverData, org.jppf.client.monitoring.topology.TopologyNode nodeData)
    Add the specified node to the specified driver in the treeTable.
    static String
    formatProperties(org.jppf.management.JPPFSystemInformation info, org.jppf.utils.PropertiesTableFormat format, Locale locale)
    Print the specified system info to a string.
    static String
    getDisplayName(org.jppf.client.monitoring.topology.AbstractTopologyComponent comp, boolean showIP)
    COmpute a display name for the given topology component.
    static String
    getSystemInfoTitle(org.jppf.client.monitoring.topology.AbstractTopologyComponent comp, Locale locale, boolean showIP)
    Generate the localized title for the system information popup dialog/window for a given topology component.
    static void
    removeDriver(AbstractJPPFTreeTableModel model, org.jppf.client.monitoring.topology.TopologyDriver driverData)
    Remove the specified driver from the treeTable.
    static void
    removeNode(AbstractJPPFTreeTableModel model, org.jppf.client.monitoring.topology.TopologyDriver driverData, org.jppf.client.monitoring.topology.TopologyNode nodeData)
    Remove the specified node from the specified driver in the treeTable.
    static org.jppf.management.JPPFSystemInformation
    retrieveSystemInfo(org.jppf.client.monitoring.topology.AbstractTopologyComponent data)
    Retrieve the system information for the specified topology object.
    static void
    updateNode(AbstractJPPFTreeTableModel model, org.jppf.client.monitoring.topology.TopologyDriver driverData, org.jppf.client.monitoring.topology.TopologyNode nodeData)
    Update the specified node.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TopologyUtils

      public TopologyUtils()
  • Method Details

    • addDriver

      public static DefaultMutableTreeNode addDriver(AbstractJPPFTreeTableModel model, org.jppf.client.monitoring.topology.TopologyDriver driver)
      Add the specified driver to the treeTable.
      Parameters:
      model - the tree table model.
      driver - the driver to add.
      Returns:
      the newly created DefaultMutableTreeNode, if any.
    • removeDriver

      public static void removeDriver(AbstractJPPFTreeTableModel model, org.jppf.client.monitoring.topology.TopologyDriver driverData)
      Remove the specified driver from the treeTable.
      Parameters:
      model - the tree table model.
      driverData - the driver to add.
    • addNode

      public static DefaultMutableTreeNode addNode(AbstractJPPFTreeTableModel model, org.jppf.client.monitoring.topology.TopologyDriver driverData, org.jppf.client.monitoring.topology.TopologyNode nodeData)
      Add the specified node to the specified driver in the treeTable.
      Parameters:
      model - the tree table model.
      driverData - the driver to add to.
      nodeData - the node to add.
      Returns:
      the newly created DefaultMutableTreeNode, if any.
    • removeNode

      public static void removeNode(AbstractJPPFTreeTableModel model, org.jppf.client.monitoring.topology.TopologyDriver driverData, org.jppf.client.monitoring.topology.TopologyNode nodeData)
      Remove the specified node from the specified driver in the treeTable.
      Parameters:
      model - the tree table model.
      driverData - the driver to add to.
      nodeData - the node to add.
    • updateNode

      public static void updateNode(AbstractJPPFTreeTableModel model, org.jppf.client.monitoring.topology.TopologyDriver driverData, org.jppf.client.monitoring.topology.TopologyNode nodeData)
      Update the specified node.
      Parameters:
      model - the tree table model.
      driverData - the driver to add to.
      nodeData - the node to add.
    • getDisplayName

      public static String getDisplayName(org.jppf.client.monitoring.topology.AbstractTopologyComponent comp, boolean showIP)
      COmpute a display name for the given topology component.
      Parameters:
      comp - the ocmponent for which to get a display name.
      showIP - whether to show IP addresses vs. host names.
      Returns:
      the display name as a string.
    • retrieveSystemInfo

      public static org.jppf.management.JPPFSystemInformation retrieveSystemInfo(org.jppf.client.monitoring.topology.AbstractTopologyComponent data)
      Retrieve the system information for the specified topology object.
      Parameters:
      data - the topology object for which to get the information.
      Returns:
      a JPPFSystemInformation or null if the information could not be retrieved.
    • formatProperties

      public static String formatProperties(org.jppf.management.JPPFSystemInformation info, org.jppf.utils.PropertiesTableFormat format, Locale locale)
      Print the specified system info to a string.
      Parameters:
      info - the information to print.
      format - the formatter to use.
      locale - the locale to use.
      Returns:
      a String with the formatted information.
    • getSystemInfoTitle

      public static String getSystemInfoTitle(org.jppf.client.monitoring.topology.AbstractTopologyComponent comp, Locale locale, boolean showIP)
      Generate the localized title for the system information popup dialog/window for a given topology component.
      Parameters:
      comp - the the topology object for which to get the information.
      locale - the locale to display the title in.
      showIP - whether to show IP addresses vs. host names.
      Returns:
      a localized string.