All Implemented Interfaces:
Node, Serializable, Remote
Direct Known Subclasses:
BackupsNode, BindsNode, CertificatesNode, DatabasesNode, DeviceNode, DevicesNode, HardDrivesNode, HostNode, HostsNode, HttpdServersNode, IpAddressesNode, IpAddressNode, RaidNode, RootNodeImpl, ServerNode, ServersNode, SingleResultNodeImpl, SlaveNode, SlavesNode, TableMultiResultNodeImpl, TableResultNodeImpl, UnallocatedNode

public abstract class NodeImpl extends UnicastRemoteObject implements Node
One in the list of nodes that form the systems tree.
Author:
AO Industries, Inc.
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • getParent

      public abstract NodeImpl getParent()
      Specified by:
      getParent in interface Node
    • getChildren

      public abstract List<? extends NodeImpl> getChildren()
      Specified by:
      getChildren in interface Node
    • getSnapshot

      protected static <E extends NodeImpl> List<E> getSnapshot(List<E> children)
      For thread safety and encapsulation, returns an unmodifiable copy of the list.
    • getSnapshot

      protected static <E extends NodeImpl> List<E> getSnapshot(E child)
      For thread safety and encapsulation, returns an unmodifiable copy of the list. Any null child is skipped.
    • getSnapshot

      protected static <E extends NodeImpl> List<E> getSnapshot(E child1, E child2)
      For thread safety and encapsulation, returns an unmodifiable copy of the list. Any null child is skipped.
    • getSnapshot

      protected static <E extends NodeImpl> List<E> getSnapshot(E child1, E child2, E child3)
      For thread safety and encapsulation, returns an unmodifiable copy of the list. Any null child is skipped.
    • getSnapshot

      protected static <E extends NodeImpl> List<E> getSnapshot(E child1, E child2, E child3, E child4)
      For thread safety and encapsulation, returns an unmodifiable copy of the list. Any null child is skipped.
    • getSnapshot

      @SafeVarargs protected static <E extends NodeImpl> List<E> getSnapshot(E... children)
      For thread safety and encapsulation, returns an unmodifiable copy of the list. Any null child is skipped.
    • getMaxAlertLevel

      protected AlertLevel getMaxAlertLevel()
      Every node may optionally constrain the maximum alert level for itself and all of its children.
    • constrainAlertLevel

      protected AlertLevel constrainAlertLevel(AlertLevel level)
      Makes sure the alert level does not exceed the maximum for this node or any of its parents. Will reduce the level to not exceed any maximum.
    • getAlertLevel

      public abstract AlertLevel getAlertLevel()
      This alert level must be constrained by the maximum alert level of this node and all of its parents.
      Specified by:
      getAlertLevel in interface Node
      See Also:
    • getAlertMessage

      public abstract String getAlertMessage()
      Specified by:
      getAlertMessage in interface Node
    • getAlertCategory

      public AlertCategory getAlertCategory()
      Defaults to the alert category of the parent node.
      Specified by:
      getAlertCategory in interface Node
      Throws:
      NullPointerException - when there is no parent
      See Also:
    • getAllowsChildren

      public abstract boolean getAllowsChildren()
      Specified by:
      getAllowsChildren in interface Node
    • getLabel

      public abstract String getLabel()
      Specified by:
      getLabel in interface Node
    • toString

      public String toString()
      The default toString is the label.
      Overrides:
      toString in class RemoteObject