Package org.onosproject.net
Class HostLocation
- java.lang.Object
-
- org.onosproject.net.ConnectPoint
-
- org.onosproject.net.HostLocation
-
- All Implemented Interfaces:
Comparable<ConnectPoint>
public class HostLocation extends ConnectPoint
Representation of a network edge location where an end-station host is connected.
-
-
Field Summary
Fields Modifier and Type Field Description static HostLocation
NONE
Represents a no location or an unknown location.
-
Constructor Summary
Constructors Constructor Description HostLocation(ConnectPoint connectPoint, long time)
Creates a new host location derived from the supplied connection point.HostLocation(DeviceId deviceId, PortNumber portNumber, long time)
Creates a new host location using the supplied device & port.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
time()
Returns the time when the location was established, given in milliseconds since start of epoch.String
toString()
-
Methods inherited from class org.onosproject.net.ConnectPoint
compareTo, deviceConnectPoint, deviceId, elementId, equals, fromString, hashCode, hostConnectPoint, hostId, ipElementId, port
-
-
-
-
Field Detail
-
NONE
public static final HostLocation NONE
Represents a no location or an unknown location.
-
-
Constructor Detail
-
HostLocation
public HostLocation(DeviceId deviceId, PortNumber portNumber, long time)
Creates a new host location using the supplied device & port.- Parameters:
deviceId
- device identityportNumber
- device port numbertime
- time when detected, in millis since start of epoch
-
HostLocation
public HostLocation(ConnectPoint connectPoint, long time)
Creates a new host location derived from the supplied connection point.- Parameters:
connectPoint
- connection pointtime
- time when detected, in millis since start of epoch
-
-
Method Detail
-
time
public long time()
Returns the time when the location was established, given in milliseconds since start of epoch.- Returns:
- time in milliseconds since start of epoch
-
toString
public String toString()
- Overrides:
toString
in classConnectPoint
-
-