Package org.onosproject.net
Class ConnectPoint
- java.lang.Object
- 
- org.onosproject.net.ConnectPoint
 
- 
- All Implemented Interfaces:
- Comparable<ConnectPoint>
 - Direct Known Subclasses:
- HostLocation
 
 public class ConnectPoint extends Object implements Comparable<ConnectPoint> Abstraction of a network connection point expressed as a pair of the network element identifier and port number.
- 
- 
Constructor SummaryConstructors Constructor Description ConnectPoint(ElementId elementId, PortNumber portNumber)Creates a new connection point.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(ConnectPoint o)static ConnectPointdeviceConnectPoint(String string)Parse a device connect point from a string.DeviceIddeviceId()Returns the identifier of the infrastructure device if the connection point belongs to a network element which is indeed an infrastructure device.ElementIdelementId()Returns the network element identifier.booleanequals(Object obj)static ConnectPointfromString(String string)Parse a device connect point from a string.inthashCode()static ConnectPointhostConnectPoint(String string)Parse a host connect point from a string.HostIdhostId()Returns the identifier of the infrastructure device if the connection point belongs to a network element which is indeed an end-station host.IpElementIdipElementId()Returns the identifier of the infrastructure device if the connection point belongs to a network element which is indeed an ip of pcc client identifier.PortNumberport()Returns the connection port number.StringtoString()
 
- 
- 
- 
Constructor Detail- 
ConnectPointpublic ConnectPoint(ElementId elementId, PortNumber portNumber) Creates a new connection point.- Parameters:
- elementId- network element identifier
- portNumber- port number
 
 
- 
 - 
Method Detail- 
elementIdpublic ElementId elementId() Returns the network element identifier.- Returns:
- element identifier
 
 - 
deviceIdpublic DeviceId deviceId() Returns the identifier of the infrastructure device if the connection point belongs to a network element which is indeed an infrastructure device.- Returns:
- network element identifier as a device identifier
- Throws:
- IllegalStateException- if connection point is not associated with a device
 
 - 
hostIdpublic HostId hostId() Returns the identifier of the infrastructure device if the connection point belongs to a network element which is indeed an end-station host.- Returns:
- network element identifier as a host identifier
- Throws:
- IllegalStateException- if connection point is not associated with a host
 
 - 
ipElementIdpublic IpElementId ipElementId() Returns the identifier of the infrastructure device if the connection point belongs to a network element which is indeed an ip of pcc client identifier.- Returns:
- network element identifier as a pcc client identifier
- Throws:
- IllegalStateException- if connection point is not associated with a pcc client
 
 - 
portpublic PortNumber port() Returns the connection port number.- Returns:
- port number
 
 - 
deviceConnectPointpublic static ConnectPoint deviceConnectPoint(String string) Parse a device connect point from a string. The connect point should be in the format "deviceUri/portNumber".- Parameters:
- string- string to parse
- Returns:
- a ConnectPoint based on the information in the string.
 
 - 
hostConnectPointpublic static ConnectPoint hostConnectPoint(String string) Parse a host connect point from a string. The connect point should be in the format "hostId/vlanId/portNumber".- Parameters:
- string- string to parse
- Returns:
- a ConnectPoint based on the information in the string.
 
 - 
fromStringpublic static ConnectPoint fromString(String string) Parse a device connect point from a string. The connect point should be in the same format as toString output.- Parameters:
- string- string to parse
- Returns:
- a ConnectPoint based on the information in the string.
 
 - 
compareTopublic int compareTo(ConnectPoint o) - Specified by:
- compareToin interface- Comparable<ConnectPoint>
 
 
- 
 
-