Class HostId

  • All Implemented Interfaces:
    NetworkResource

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

      Fields 
      Modifier and Type Field Description
      static HostId NONE
      Represents either no host, or an unspecified host; used for creating open ingress/egress edge links.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      static HostId hostId​(java.lang.String string)
      Creates a device id using the supplied ID string.
      static HostId hostId​(org.onlab.packet.MacAddress mac)
      Creates a device id using the supplied MAC and default VLAN.
      static HostId hostId​(org.onlab.packet.MacAddress mac, org.onlab.packet.VlanId vlanId)
      Creates a device id using the supplied MAC & VLAN ID.
      org.onlab.packet.MacAddress mac()
      Returns the host MAC address.
      java.lang.String toString()  
      org.onlab.packet.VlanId vlanId()
      Returns the host vlan Id.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • 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 org.onlab.packet.MacAddress mac()
        Returns the host MAC address.
        Returns:
        MAC address
      • vlanId

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

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

        public static HostId hostId​(org.onlab.packet.MacAddress mac,
                                    org.onlab.packet.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​(org.onlab.packet.MacAddress mac)
        Creates a device id using the supplied MAC and default VLAN.
        Parameters:
        mac - mac address
        Returns:
        host identifier
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object