Class UiLink

  • Direct Known Subclasses:
    UiDeviceLink, UiEdgeLink, UiRegionDeviceLink, UiRegionLink

    public abstract class UiLink
    extends UiElement
    Represents a link (line between two elements). This may be one of several concrete subclasses:
    • An infrastructure link: two backing unidirectional links between two devices.
    • An edge link: representing the connection between a host and a device.
    • An aggregation link: representing multiple underlying UI link instances, for example the link between two sub-regions in a region (layout).
    • Constructor Summary

      Constructors 
      Constructor Description
      UiLink​(UiTopology topology, UiLinkId id)
      Creates a UI link.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract java.lang.String endPointA()
      Returns the identifier of end-point A in string form.
      abstract java.lang.String endPointB()
      Returns the identifier of end-point B in string form.
      java.lang.String endPortA()
      Returns the port number (as a string) for end-point A, if applicable.
      java.lang.String endPortB()
      Returns the port number (as a string) for end-point B, if applicable.
      UiLinkId id()
      Returns the canonicalized link identifier for this link.
      java.lang.String idAsString()
      Returns a string representation of the element identifier.
      java.lang.String toString()  
      java.lang.String type()
      Returns the implementing class name as the type of link.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • UiLink

        public UiLink​(UiTopology topology,
                      UiLinkId id)
        Creates a UI link.
        Parameters:
        topology - parent topology
        id - canonicalized link identifier
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • id

        public UiLinkId id()
        Returns the canonicalized link identifier for this link.
        Returns:
        the link identifier
      • idAsString

        public java.lang.String idAsString()
        Description copied from class: UiElement
        Returns a string representation of the element identifier.
        Specified by:
        idAsString in class UiElement
        Returns:
        the element unique identifier
      • type

        public java.lang.String type()
        Returns the implementing class name as the type of link.
        Returns:
        link type
      • endPointA

        public abstract java.lang.String endPointA()
        Returns the identifier of end-point A in string form.
        Returns:
        end point A identifier
      • endPointB

        public abstract java.lang.String endPointB()
        Returns the identifier of end-point B in string form.
        Returns:
        end point B identifier
      • endPortA

        public java.lang.String endPortA()
        Returns the port number (as a string) for end-point A, if applicable. This default implementation returns null, indicating not-applicable. Subclasses only need to override this method if end-point A has an associated port.
        Returns:
        port number for end-point A
      • endPortB

        public java.lang.String endPortB()
        Returns the port number (as a string) for end-point B, if applicable. This default implementation returns null, indicating not-applicable. Subclasses only need to override this method if end-point B has an associated port.
        Returns:
        port number for end-point B