Package org.onosproject.net
Class HostId
- java.lang.Object
- 
- org.onosproject.net.ElementId
- 
- org.onosproject.net.HostId
 
 
- 
- All Implemented Interfaces:
- NetworkResource
 
 public final class HostId extends ElementId Immutable representation of a host identity.
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)inthashCode()static HostIdhostId(java.lang.String string)Creates a device id using the supplied ID string.static HostIdhostId(MacAddress mac)Creates a device id using the supplied MAC and default VLAN.static HostIdhostId(MacAddress mac, VlanId vlanId)Creates a device id using the supplied MAC & VLAN ID.MacAddressmac()Returns the host MAC address.java.lang.StringtoString()VlanIdvlanId()Returns the host vlan Id.
 
- 
- 
- 
Field Detail- 
NONEpublic static final HostId NONE Represents either no host, or an unspecified host; used for creating open ingress/egress edge links.
 
- 
 - 
Method Detail- 
macpublic MacAddress mac() Returns the host MAC address.- Returns:
- MAC address
 
 - 
vlanIdpublic VlanId vlanId() Returns the host vlan Id.- Returns:
- vlan Id
 
 - 
hostIdpublic static HostId hostId(java.lang.String string) Creates a device id using the supplied ID string.- Parameters:
- string- device URI string
- Returns:
- host identifier
 
 - 
hostIdpublic static HostId hostId(MacAddress mac, VlanId vlanId) Creates a device id using the supplied MAC & VLAN ID.- Parameters:
- mac- mac address
- vlanId- vlan identifier
- Returns:
- host identifier
 
 - 
hostIdpublic static HostId hostId(MacAddress mac) Creates a device id using the supplied MAC and default VLAN.- Parameters:
- mac- mac address
- Returns:
- host identifier
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
equalspublic boolean equals(java.lang.Object obj) - Overrides:
- equalsin class- java.lang.Object
 
 
- 
 
-