java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.inductiveautomation.ignition.client.util.gui.diagnostics.ConnectionStatusPanel
All Implemented Interfaces:
ConnectionStatusListener, ImageObserver, MenuContainer, Serializable, Accessible

public class ConnectionStatusPanel extends JPanel implements ConnectionStatusListener
See Also:
  • Field Details

    • FORMAT_MILLIS

      public static final NumberFormat FORMAT_MILLIS
    • logger

      public static final LoggerEx logger
    • URL_BASE_COLOR

      public static final Color URL_BASE_COLOR
    • URL_ROLLOVER_COLOR

      public static final Color URL_ROLLOVER_COLOR
  • Constructor Details

    • ConnectionStatusPanel

      public ConnectionStatusPanel(boolean showPingCharts)
  • Method Details

    • updateStatus

      public void updateStatus(GatewayInterface gateway, String nodeRole, int connectionStatus, String projectState, String additionalInfo)
      Description copied from interface: ConnectionStatusListener
      Expect this method to be called every few seconds by a timer in the AbstractGatewayConnection. The timer continually tests the status of the master and backup connections. This method also gets fired when a connection changed event occurs for independent connections.
      Specified by:
      updateStatus in interface ConnectionStatusListener
      Parameters:
      gateway - the Gateway address of the connection as a GatewayInterface
      nodeRole - the redundant node role. May be "Master", "Backup", or "" for independent connections.
      connectionStatus - one of the Status_* variables in AbstractGatewayConnection, representing the updated connection status.
      projectState - applies to redundant system and can be Unknown, Incompatible, OutOfDate, or Good as per the ProjectState enum. Pass in null for unknown project state or non-redundant systems.
      additionalInfo - any extra information that can be provided about the status. Connection events tend to have extra info, particularly when Exceptions have been thrown.
    • updateNodeRole

      public void updateNodeRole(String newRole)
      Description copied from interface: ConnectionStatusListener
      Informs any listeners that the client's redundancy node role has changed. This affects the how connections are displayed (either Master/Backup mode or Independent mode). The new role could be "Master", "Backup" or "Independent".
      Specified by:
      updateNodeRole in interface ConnectionStatusListener
      Parameters:
      newRole - Name of new role
    • updatePingTime

      public void updatePingTime(String nodeRole, Double pingTime)
      Description copied from interface: ConnectionStatusListener
      Informs listeners about how long the last successful ping operation took to run against the Gateway..
      Specified by:
      updatePingTime in interface ConnectionStatusListener
      Parameters:
      nodeRole - the redundant node role. May be "Master", "Backup", or "" for independent connections.
      pingTime - the number of milliseconds that it took to run the ping. Pass Double.NAN to indicate an error occurred during the ping.