Class UiDeviceLink


  • public class UiDeviceLink
    extends UiLink
    Represents a link between two devices; that is, an infrastructure link.
    • Constructor Detail

      • UiDeviceLink

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

      • endPointA

        public String endPointA()
        Description copied from class: UiLink
        Returns the identifier of end-point A in string form.
        Specified by:
        endPointA in class UiLink
        Returns:
        end point A identifier
      • endPointB

        public String endPointB()
        Description copied from class: UiLink
        Returns the identifier of end-point B in string form.
        Specified by:
        endPointB in class UiLink
        Returns:
        end point B identifier
      • endPortA

        public String endPortA()
        Description copied from class: UiLink
        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.
        Overrides:
        endPortA in class UiLink
        Returns:
        port number for end-point A
      • endPortB

        public String endPortB()
        Description copied from class: UiLink
        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.
        Overrides:
        endPortB in class UiLink
        Returns:
        port number for end-point B
      • destroy

        protected void destroy()
        Description copied from class: UiElement
        Removes all external references, and prepares the instance for garbage collection. This default implementation does nothing.
        Overrides:
        destroy in class UiElement
      • attachBackingLink

        public void attachBackingLink​(Link link)
        Attaches the given backing link to this UI link. This method will throw an exception if this UI link is not representative of the supplied link.
        Parameters:
        link - backing link to attach
        Throws:
        IllegalArgumentException - if the link is not appropriate
      • detachBackingLink

        public boolean detachBackingLink​(Link link)
        Detaches the given backing link from this UI link, returning true if the reverse link is still attached, or false otherwise.
        Parameters:
        link - the backing link to detach
        Returns:
        true if other link still attached, false otherwise
        Throws:
        IllegalArgumentException - if the link is not appropriate
      • deviceA

        public DeviceId deviceA()
        Returns the identity of device A.
        Returns:
        device A ID
      • portA

        public PortNumber portA()
        Returns the port number of device A.
        Returns:
        port A
      • deviceB

        public DeviceId deviceB()
        Returns the identity of device B.
        Returns:
        device B ID
      • portB

        public PortNumber portB()
        Returns the port number of device B.
        Returns:
        port B
      • linkAtoB

        public Link linkAtoB()
        Returns backing link from A to B.
        Returns:
        backing link A to B
      • linkBtoA

        public Link linkBtoA()
        Returns backing link from B to A.
        Returns:
        backing link B to A