com.h3c.sdn.nodemgr

## Interface NodeService

-     public interface NodeService

  Exposes the services of Node Manager. Node Manager learns the end hosts in the network and groups them by VLAN. It creates the ARP mappings for the end hosts.

  Interested listeners may register as `NetworkNodeListener`s, to subscribe for end host related events.

  Methods are provided that:

  - list the end hosts for a given VLAN
  - return the end host matching an IP address within a VLAN
  - return the ARP translations for end hosts
  - return the MAC address for a given end host's IP, within a VLAN
  - list all VLANs

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addAllHostInDataBase()`
    `boolean` | `addCfgHost(MacAddress mac, IpAddress ip, VId vlan, DataPathId dpid, BigPortNumber portNum)` Adding a static host
    `boolean` | `addCtlAddrManager(VId vid, IpAddress ipAddr, IpAddress maskIpAddr, MacAddress macAddr)`
    `void` | `addNetworkNodeListener(NetworkNodeListener nnl)` Registers the specified listener for end host related events.
    `void` | `addNodeFlowEntry(MacAddress srcMac, MacAddress dstMac, Object o)`
    `void` | `clearNodeTable()` Clears all learned end nodes from the controller.
    `void` | `clearNodeTable(Set<VId> vids)` Clears the learned end nodes for the given set of VLANs.
    `void` | `clearNodeTable(VId vid)` Clears the learned end nodes for the given VLAN.
    `void` | `delAllNode(DataPathId dpId)`
    `boolean` | `delCfgHost(DataPathId dpId, BigPortNumber port)` Deleting a static configured host
    `boolean` | `delCfgHost(MacAddress mac, VId vlan)` Deleting a static host
    `boolean` | `delCtlAddrManager(VId vid, IpAddress ipAddr, IpAddress maskIpAddr, MacAddress macAddr)`
    `void` | `deleteAllHostInDataBase()`
    `ConcurrentMap<VId,CtlAddrEntity>` | `getAllCtlAddrManager()`
    `List<Entity>` | `getAllHost(DataPathId dpId, BigPortNumber port)` get all host entry
    `List<Entity>` | `getAllStaticHost()` Get all the static hosts information
    `List<Entity>` | `getAllStaticHost(DataPathId dpId, BigPortNumber port)` Get all the static hosts information
    `ARPTable` | `getArpTable(VId vid)` Returns the ARP table for the given VLAN.
    `Entity` | `getCfgHost(MacAddress mac, VId vid)` Get a static configured host
    `CtlAddrEntity` | `getCtlAddrManager(VId vid)`
    `IpAddress` | `getIpAddress(MacAddress mac, VId vid)` Returns the IP Address for the given MAC address and VLAN.
    `MacAddress` | `getMacAddress(IpAddress ip, VId vid)` Returns the MAC Address for the given IP address and VLAN.
    `NetworkNode` | `getNetworkNode(IpAddress ip, VId vid)` Returns the end host for the given IP address and VLAN.
    `NetworkNode` | `getNetworkNode(MacAddress mac, VId vid)` Returns the end host for the given MAC address and VLAN.
    `Set<NetworkNode>` | `getNetworkNodes(VId vid)` Returns the set of end hosts for the given VLAN.
    `long` | `getNodeCounts()`
    `Set<VId>` | `getVnetIDs()` Returns the set of VLAN identifiers learnt in the network, via the end hosts.
    `boolean` | `isStaticHost(VId vid, MacAddress macAddr)` decide a host as static host
    `void` | `notifyDstMacOnly(boolean isDstMacOnly)` notify node manager layer2 dstmac enable or not when enable, arp table create by MAC when disable ,arp table create by IP added by s03140 for layer2DstMacAddrOnly
    `void` | `removeArpbyPort(DataPathId dpId, BigPortNumber portNumber)` remove arp table when port is down or abnormal added by s03140 for 201312110058
    `void` | `removeNetworkNodeListener(NetworkNodeListener nnl)` Removes the specified listener from the Node Manager service.
    `void` | `removeNodeFlowEntry(MacAddress srcMac, MacAddress dstMac, Object o)`
    `void` | `setHostAging()` Setting All the Hosts to aging
    `void` | `setHostNoAging()` Setting All the Hosts not to aging

- - ### Method Detail

    - #### getNetworkNode

          NetworkNode getNetworkNode(MacAddress mac,
                                   VId vid)

      Returns the end host for the given MAC address and VLAN.
      Parameters:
        `mac` - the MAC address of the end host
        `vid` - the identifier for the VLAN
      Returns:
        the end host
      Throws:
        `NullPointerException` - if either parameter is null

    - #### getNetworkNode

          NetworkNode getNetworkNode(IpAddress ip,
                                   VId vid)

      Returns the end host for the given IP address and VLAN.
      Parameters:
        `ip` - the IP address of the end host
        `vid` - the VLAN to which the end host belongs
      Returns:
        the end host
      Throws:
        `NullPointerException` - if either parameter is null

    - #### getNetworkNodes

          Set<NetworkNode> getNetworkNodes(VId vid)

      Returns the set of end hosts for the given VLAN.
      Parameters:
        `vid` - the VLAN to which the end hosts belong
      Returns:
        the set of end hosts
      Throws:
        `NullPointerException` - if vid is null

    - #### getMacAddress

          MacAddress getMacAddress(IpAddress ip,
                                 VId vid)

      Returns the MAC Address for the given IP address and VLAN.
      Parameters:
        `ip` - the IP address of the end host
        `vid` - the VLAN to which the end host belongs
      Returns:
        the MAC address of the end host
      Throws:
        `NullPointerException` - if either parameter is null

    - #### getIpAddress

          IpAddress getIpAddress(MacAddress mac,
                               VId vid)

      Returns the IP Address for the given MAC address and VLAN.
      Parameters:
        `mac` - the MAC address of the end host
        `vid` - the VLAN to which the end host belongs
      Returns:
        the MAC address of the end host
      Throws:
        `NullPointerException` - if either parameter is null added by s03140 for layer2DstMacAddrOnly

    - #### clearNodeTable

          void clearNodeTable(VId vid)

      Clears the learned end nodes for the given VLAN.
      Parameters:
        `vid` - the VLAN identifier
      Throws:
        `NullPointerException` - if vid is null

    - #### clearNodeTable

          void clearNodeTable(Set<VId> vids)

      Clears the learned end nodes for the given set of VLANs.
      Parameters:
        `vids` - the set of VLAN identifiers
      Throws:
        `NullPointerException` - if the set is null, or if any of the entries in the set is null

    - #### clearNodeTable

          void clearNodeTable()

      Clears all learned end nodes from the controller.

    - #### getArpTable

          ARPTable getArpTable(VId vid)

      Returns the ARP table for the given VLAN. The table contains the IP-MAC associations for the end hosts in the specified VLAN.
      Parameters:
        `vid` - the VLAN identifier
      Returns:
        the corresponding ARP table
      Throws:
        `NullPointerException` - if vid is null

    - #### getVnetIDs

          Set<VId> getVnetIDs()

      Returns the set of VLAN identifiers learnt in the network, via the end hosts.
      Returns:
        the set of VLAN identifiers

    - #### addNetworkNodeListener

          void addNetworkNodeListener(NetworkNodeListener nnl)

      Registers the specified listener for end host related events.
      Parameters:
        `nnl` - the listener to be registered
      Throws:
        `NullPointerException` - if nnl is null

    - #### removeNetworkNodeListener

          void removeNetworkNodeListener(NetworkNodeListener nnl)

      Removes the specified listener from the Node Manager service.
      Parameters:
        `nnl` - the listener to be removed
      Throws:
        `NullPointerException` - if nnl is null

    - #### addNodeFlowEntry

          void addNodeFlowEntry(MacAddress srcMac,
                              MacAddress dstMac,
                              Object o)

    - #### removeNodeFlowEntry

          void removeNodeFlowEntry(MacAddress srcMac,
                                 MacAddress dstMac,
                                 Object o)

    - #### delAllNode

          void delAllNode(DataPathId dpId)

    - #### removeArpbyPort

          void removeArpbyPort(DataPathId dpId,
                             BigPortNumber portNumber)

      remove arp table when port is down or abnormal added by s03140 for 201312110058

    - #### setHostNoAging

          void setHostNoAging()

      Setting All the Hosts not to aging

    - #### setHostAging

          void setHostAging()

      Setting All the Hosts to aging

    - #### addCfgHost

          boolean addCfgHost(MacAddress mac,
                           IpAddress ip,
                           VId vlan,
                           DataPathId dpid,
                           BigPortNumber portNum)

      Adding a static host
      Parameters:
        `mac` -
        `ip` -
        `vlan` -
        `dpid` -
        `portNum` -
      Returns:

    - #### delCfgHost

          boolean delCfgHost(MacAddress mac,
                           VId vlan)

      Deleting a static host
      Parameters:
        `mac` -
        `vlan` -
      Returns:

    - #### getAllStaticHost

          List<Entity> getAllStaticHost()

      Get all the static hosts information
      Returns:

    - #### getAllHost

          List<Entity> getAllHost(DataPathId dpId,
                                BigPortNumber port)

      get all host entry
      Parameters:
        `dpId` - device id
        `port` - port id
      Returns:

    - #### addAllHostInDataBase

          void addAllHostInDataBase()

    - #### deleteAllHostInDataBase

          void deleteAllHostInDataBase()

    - #### notifyDstMacOnly

          void notifyDstMacOnly(boolean isDstMacOnly)

      notify node manager layer2 dstmac enable or not when enable, arp table create by MAC when disable ,arp table create by IP added by s03140 for layer2DstMacAddrOnly

    - #### getNodeCounts

          long getNodeCounts()

    - #### delCfgHost

          boolean delCfgHost(DataPathId dpId,
                           BigPortNumber port)

      Deleting a static configured host
      Parameters:
        `dpId` - device id
        `port` - port id
      Returns:

    - #### isStaticHost

          boolean isStaticHost(VId vid,
                             MacAddress macAddr)

      decide a host as static host
      Parameters:
        `vid` - vlan id
        `mac` - mac address
      Returns:

    - #### getAllStaticHost

          List<Entity> getAllStaticHost(DataPathId dpId,
                                      BigPortNumber port)

      Get all the static hosts information
      Parameters:
        `dpId,` - device id
        `port` - port id
      Returns:

    - #### addCtlAddrManager

          boolean addCtlAddrManager(VId vid,
                                  IpAddress ipAddr,
                                  IpAddress maskIpAddr,
                                  MacAddress macAddr)

    - #### delCtlAddrManager

          boolean delCtlAddrManager(VId vid,
                                  IpAddress ipAddr,
                                  IpAddress maskIpAddr,
                                  MacAddress macAddr)

    - #### getCtlAddrManager

          CtlAddrEntity getCtlAddrManager(VId vid)

    - #### getAllCtlAddrManager

          ConcurrentMap<VId,CtlAddrEntity> getAllCtlAddrManager()

    - #### getCfgHost

          Entity getCfgHost(MacAddress mac,
                          VId vid)

      Get a static configured host
      Parameters:
        `mac` - host MAC Address
        `vid` - vlan id
      Returns:

Copyright © 2014. All Rights Reserved.