com.h3c.sdn.misc.net

## Class NodeMessage

- java.lang.Object
- - com.h3c.sdn.misc.net.Entity
  - - com.h3c.sdn.misc.net.NodeMessage

- All Implemented Interfaces:
    Serializable

      public class NodeMessage
      extends Entity

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NodeMessage(Entity entity, UpdateType op)` Constructs a new NodeMessage using Entity.
    `NodeMessage(MacAddress mac, VId vid, IpAddress ip, DataPathId dpid, BigPortNumber port, long age, UpdateType op, int controllerId)`
    `NodeMessage(MacAddress mac, VId vid, IpAddress ip, DataPathId dpid, BigPortNumber port, UpdateType op, int controllerId)` Constructs a new NodeMessage using MAC, VLAN, IP, data path id and port.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Entity` | `entity()` Returns the entity from Node Message.
    `boolean` | `equals(Object obj)`
    `int` | `hashCode()`
    `UpdateType` | `operation()` Gets the operation.
    `void` | `setOperation(UpdateType operation)` Sets the operation.

    - ### Methods inherited from class com.h3c.sdn.misc.net.Entity

      `controllerId, dpid, getAge, getARPTableEntry, getNetworkNode, ip, lastAccessed, mac, resetLastAccessed, setAge, setControllerId, setLastAccessed, switchPort, toString, vid`

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

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

- - ### Constructor Detail

    - #### NodeMessage

          public NodeMessage(MacAddress mac,
                     VId vid,
                     IpAddress ip,
                     DataPathId dpid,
                     BigPortNumber port,
                     UpdateType op,
                     int controllerId)

      Constructs a new NodeMessage using MAC, VLAN, IP, data path id and port.
      Parameters:
        `mac` - the MAC address
        `vid` - the VLAN ID
        `ip` - the IP address
        `dpid` - the Switch DPID
        `port` - the port
        `op` - operation to be performed on this message
        `controllerId` - the hash of the controller instance id

    - #### NodeMessage

          public NodeMessage(MacAddress mac,
                     VId vid,
                     IpAddress ip,
                     DataPathId dpid,
                     BigPortNumber port,
                     long age,
                     UpdateType op,
                     int controllerId)

    - #### NodeMessage

          public NodeMessage(Entity entity,
                     UpdateType op)

      Constructs a new NodeMessage using Entity.
      Parameters:
        `entity` - the entity
        `op` - operation to be performed on this message

  - ### Method Detail

    - #### operation

          public UpdateType operation()

      Gets the operation.
      Returns:
        the operation

    - #### entity

          public Entity entity()

      Returns the entity from Node Message.
      Returns:
        the entity

    - #### setOperation

          public void setOperation(UpdateType operation)

      Sets the operation.
      Parameters:
        `operation` - the new operation

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Entity`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Entity`

Copyright © 2014. All Rights Reserved.