Package org.onosproject.ui.model.topo
Class UiLink
- java.lang.Object
 - 
- org.onosproject.ui.model.topo.UiElement
 - 
- org.onosproject.ui.model.topo.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).
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected UiLinkIdidprotected UiTopologytopology 
- 
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.StringendPointA()Returns the identifier of end-point A in string form.abstract java.lang.StringendPointB()Returns the identifier of end-point B in string form.java.lang.StringendPortA()Returns the port number (as a string) for end-point A, if applicable.java.lang.StringendPortB()Returns the port number (as a string) for end-point B, if applicable.UiLinkIdid()Returns the canonicalized link identifier for this link.java.lang.StringidAsString()Returns a string representation of the element identifier.java.lang.StringtoString()java.lang.Stringtype()Returns the implementing class name as the type of link. 
 - 
 
- 
- 
Field Detail
- 
topology
protected final UiTopology topology
 
- 
id
protected final UiLinkId id
 
 - 
 
- 
Constructor Detail
- 
UiLink
public UiLink(UiTopology topology, UiLinkId id)
Creates a UI link.- Parameters:
 topology- parent topologyid- canonicalized link identifier
 
 - 
 
- 
Method Detail
- 
toString
public java.lang.String toString()
- Overrides:
 toStringin classjava.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:UiElementReturns a string representation of the element identifier.- Specified by:
 idAsStringin classUiElement- 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
 
 
 - 
 
 -