Class HostId

  • All Implemented Interfaces:
    NetworkResource

    public final class HostId
    extends ElementId
    Immutable representation of a host identity.
    • Field Detail

      • NONE

        public static final HostId NONE
        Represents either no host, or an unspecified host; used for creating open ingress/egress edge links.
    • Method Detail

      • mac

        public MacAddress mac()
        Returns the host MAC address.
        Returns:
        MAC address
      • vlanId

        public VlanId vlanId()
        Returns the host vlan Id.
        Returns:
        vlan Id
      • hostId

        public static HostId hostId​(String string)
        Creates a device id using the supplied ID string.
        Parameters:
        string - device URI string
        Returns:
        host identifier
      • hostId

        public 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
      • hostId

        public static HostId hostId​(MacAddress mac)
        Creates a device id using the supplied MAC and default VLAN.
        Parameters:
        mac - mac address
        Returns:
        host identifier
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object