com.h3c.sdn.misc.net

## Class LinkDTO

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

- All Implemented Interfaces:
    Link, Serializable

      public class LinkDTO
      extends Object
      implements Link, Serializable

  Provides an implementation of `Link`.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.h3c.sdn.common.Link

      `Link.Type`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LinkDTO(ConnectionPoint linkSrc, ConnectionPoint linkDst, LinkInfo linkInfo)` Creates a DTO representing a link between two `connection points`.
    `LinkDTO(DataPathId srcDpid, BigPortNumber srcPort, ConnectionPoint.Type srcType, DataPathId dstDpid, BigPortNumber dstPort, ConnectionPoint.Type dstType, LinkInfo linkInfo)` Creates a DTO representing a link between two `connection points`.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ConnectionPoint` | `dst()` Returns the destination `connection point` of the referred link.
    `boolean` | `equals(Object obj)`
    `int` | `hashCode()`
    `LinkInfo` | `info()` Returns the optional `link information` associated with the link.
    `ConnectionPoint` | `src()` Returns the source `connection point` of the referred link.
    `String` | `toKeyString()`
    `String` | `toString()`
    `void` | `updateLinkInfo(LinkInfo linkInfo)` Updates the `link information` of the link.
    `static LinkDTO` | `valueOf(String sLink)`

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

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

- - ### Constructor Detail

    - #### LinkDTO

          public LinkDTO(ConnectionPoint linkSrc,
                 ConnectionPoint linkDst,
                 LinkInfo linkInfo)

      Creates a DTO representing a link between two `connection points`. Optional `information` may be associated, which describes the link status and the time of discovery.
      Parameters:
        `linkSrc` - the source connection point
        `linkDst` - the destination connection point
        `linkInfo` - the associated information (optional)
      Throws:
        `NullPointerException` - if linkSrc or linkDst is null

    - #### LinkDTO

          public LinkDTO(DataPathId srcDpid,
                 BigPortNumber srcPort,
                 ConnectionPoint.Type srcType,
                 DataPathId dstDpid,
                 BigPortNumber dstPort,
                 ConnectionPoint.Type dstType,
                 LinkInfo linkInfo)

      Creates a DTO representing a link between two `connection points`. The arguments define the connection points as a <switch,port> tuple. Optional `information` may be associated, which describes the link status and the time of discovery.
      Parameters:
        `srcDpid` - the source datapath
        `srcPort` - the source port
        `srcType` - the source connection point type
        `dstDpid` - the destination datapath
        `dstPort` - the destination port
        `dstType` - the destination connection point type
        `linkInfo` - the associated information (optional)
      Throws:
        `NullPointerException` - if any parameter (except linkInfo) is null

  - ### Method Detail

    - #### src

          public ConnectionPoint src()

      Description copied from interface: `Link`
      Returns the source `connection point` of the referred link.
      Specified by:
        `src` in interface `Link`
      Returns:
        source connection point

    - #### dst

          public ConnectionPoint dst()

      Description copied from interface: `Link`
      Returns the destination `connection point` of the referred link.
      Specified by:
        `dst` in interface `Link`
      Returns:
        destination connection point

    - #### info

          public LinkInfo info()

      Description copied from interface: `Link`
      Returns the optional `link information` associated with the link. It describes the link status and the time of discovery of the link
      Specified by:
        `info` in interface `Link`
      Returns:
        link info associated with the referred link

    - #### updateLinkInfo

          public void updateLinkInfo(LinkInfo linkInfo)

      Description copied from interface: `Link`
      Updates the `link information` of the link. It describes the link status and the time of discovery of the link
      Specified by:
        `updateLinkInfo` in interface `Link`
      Parameters:
        `linkInfo` - the information to be associated with the referred link

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### toKeyString

          public String toKeyString()

    - #### valueOf

          public static LinkDTO valueOf(String sLink)

Copyright © 2014. All Rights Reserved.