com.h3c.sdn.misc.net

## Class NetworkNodeDTO

- java.lang.Object
- - com.h3c.sdn.misc.net.NetworkNodeDTO

- All Implemented Interfaces:
    NetworkNode

      public class NetworkNodeDTO
      extends Object
      implements NetworkNode

  Provides an implementation of `NetworkNode`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NetworkNodeDTO(MacAddress mac, VId vid, IpAddress ip, DataPathId dpid, BigPortNumber port)` Constructs a NetworkNode instance using the specified IP, MAC VID, DPID and port.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addConnectionPoint(ConnectionPoint connectionPoint)` Adds a connection point to the list of connection points where the host was heard.
    `BigPortNumber` | `connectedPort()` Returns the port on which the end host is connected.
    `DataPathId` | `connectedSwitchDpid()` Returns the datapath identifier of the switch to which the end host is connected.
    `List<ConnectionPoint>` | `connectionPoints()` Returns a list of `connection points` where the end host was heard.
    `boolean` | `equals(Object obj)`
    `int` | `hashCode()`
    `IpAddress` | `ip()` Returns the IP address of the end host.
    `MacAddress` | `mac()` Returns the MAC address of the end host.
    `String` | `toString()`
    `VId` | `vid()` Returns the VID to which the end host belongs.

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### NetworkNodeDTO

          public NetworkNodeDTO(MacAddress mac,
                        VId vid,
                        IpAddress ip,
                        DataPathId dpid,
                        BigPortNumber port)

      Constructs a NetworkNode instance using the specified IP, MAC VID, DPID and port.
      Parameters:
        `ip` - the IP address of the host
        `mac` - the MAC address of the host
        `vid` - the VID of the host
        `dpid` - the datapath ID of the switch to which the host is connected
        `port` - the port to which the host is connected

  - ### Method Detail

    - #### ip

          public IpAddress ip()

      Description copied from interface: `NetworkNode`
      Returns the IP address of the end host.
      Specified by:
        `ip` in interface `NetworkNode`
      Returns:
        the IP address

    - #### mac

          public MacAddress mac()

      Description copied from interface: `NetworkNode`
      Returns the MAC address of the end host.
      Specified by:
        `mac` in interface `NetworkNode`
      Returns:
        the MAC address of the end host

    - #### connectedSwitchDpid

          public DataPathId connectedSwitchDpid()

      Description copied from interface: `NetworkNode`
      Returns the datapath identifier of the switch to which the end host is connected.
      Specified by:
        `connectedSwitchDpid` in interface `NetworkNode`
      Returns:
        the DPID

    - #### connectedPort

          public BigPortNumber connectedPort()

      Description copied from interface: `NetworkNode`
      Returns the port on which the end host is connected.
      Specified by:
        `connectedPort` in interface `NetworkNode`
      Returns:
        the port on which end host is connected

    - #### vid

          public VId vid()

      Description copied from interface: `NetworkNode`
      Returns the VID to which the end host belongs.
      Specified by:
        `vid` in interface `NetworkNode`
      Returns:
        the VID identifier

    - #### connectionPoints

          public List<ConnectionPoint> connectionPoints()

      Description copied from interface: `NetworkNode`
      Returns a list of `connection points` where the end host was heard.

      Holds the port at which the end host is connected.

      Specified by:
        `connectionPoints` in interface `NetworkNode`
      Returns:
        the list of connection points

    - #### addConnectionPoint

          public void addConnectionPoint(ConnectionPoint connectionPoint)

      Adds a connection point to the list of connection points where the host was heard.
      Parameters:
        `connectionPoint` - the connection point where the host was heard

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2014. All Rights Reserved.